Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSTimestamp


    public void setTime(String newTime) {
      time = newTime;
    }
   
    public String day() throws Exception {
        NSTimestamp date = (NSTimestamp)objectPropertyValue();
        if (date != null)
            day = DAY_FORMAT.format(date);
        else
            day = DAY_FORMAT.format(new NSTimestamp());
        return day;
    }
View Full Code Here


    public String monthName() throws Exception {
        return (String)monthNameList().objectAtIndex(Integer.parseInt(currentMonth)-1);
    }
   
    public String month() throws Exception {
        NSTimestamp date = (NSTimestamp)objectPropertyValue();
        if (date != null)
            month = MONTH_FORMAT.format(date);
        else
            month = MONTH_FORMAT.format(new NSTimestamp());
        return month;
    }
View Full Code Here

        return month;
    }
    public void setMonth(String newMonth) throws Exception { month = newMonth; }

    public String year() throws Exception {
        NSTimestamp date = (NSTimestamp) objectPropertyValue();
        if (date != null)
            year = YEAR_FORMAT.format(date);
        else
            year = YEAR_FORMAT.format(new NSTimestamp());
        return year;
    }
View Full Code Here

            resultLines.add(line);
        }

        results = resultLines.componentsJoinedByString("<br/>\n");

        NSTimestamp created = new NSTimestamp();

        EOEnterpriseObject result = EOUtilities.createAndInsertInstance(ec, "Result");

        result.takeValueForKey(created, "whence");
View Full Code Here

            context = ((D2WPage)context().page()).d2wContext();
        }
        return context;
    }

    public NSTimestamp now() { return new NSTimestamp(); }
View Full Code Here

    }
   
    @Override
    public void takeValuesFromRequest (WORequest request, WOContext context) {
        super.takeValuesFromRequest (request,context);
        NSTimestamp date = null;
        try {
            if (time==null || time.length()!=5)
                date = (NSTimestamp)ALL_FORMAT.parseObject(day+" "+month+" "+year);
            else
                date = (NSTimestamp)ALL_FORMAT_AND_TIME.parseObject(day+" "+month+" "+year+" "+time);
View Full Code Here

        }
        return _maxValue;
    }

    public NSTimestamp dateForString(String dateString) {
        NSTimestamp date = null;
        try {
          if(dateString!=null) {
            date = (NSTimestamp)dateFormatter().parseObject(dateString);
          }
        } catch (java.text.ParseException nspe) {
View Full Code Here

        return date;
    }

    public void setMinValue(String min) {
        _minValue=min;
        NSTimestamp minDate = dateForString(min);
        if(minDate != null)
            displayGroup().queryMin().takeValueForKey(minDate, propertyKey());
        else
           displayGroup().queryMin().removeObjectForKey(propertyKey());
    }
View Full Code Here

           displayGroup().queryMin().removeObjectForKey(propertyKey());
    }

    public void setMaxValue(String max) {
        _maxValue=max;
        NSTimestamp maxDate = dateForString(max);
        if(maxDate != null)
            displayGroup().queryMax().takeValueForKey(maxDate, propertyKey());
        else
          displayGroup().queryMax().removeObjectForKey(propertyKey());
    }
View Full Code Here

    protected String _formatter;
    protected NSTimestampFormatter _dateFormatter;
   
    @Override
    public void appendToResponse(WOResponse r, WOContext c){
        NSTimestamp date = (NSTimestamp)objectPropertyValue();
        if(date != null) {
            try {
                dateString = dateFormatter().format(date);
            } catch(IllegalArgumentException nsfe){
                // nothing?
View Full Code Here

TOP

Related Classes of com.webobjects.foundation.NSTimestamp

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.