Examples of timestampByAddingGregorianUnits()


Examples of com.webobjects.foundation.NSTimestamp.timestampByAddingGregorianUnits()

    }
    NSTimestamp dateDue = new NSTimestamp().timestampByAddingGregorianUnits(0, 5, 0, 0, 0, 0);
    for (int i = 8; i >= 0; i--) {
      Release release = releases.objectAtIndex(i);
      release.setDateDue(dateDue);
      dateDue = dateDue.timestampByAddingGregorianUnits(0, -(randomInt(2) + 1), 0, 0, 0, 0);
    }

    for (int i = 0; i < 10; i++) {
      Component component = Component.clazz.createAndInsertObject(ec);
      component.setOwner(randomUser());
View Full Code Here

Examples of com.webobjects.foundation.NSTimestamp.timestampByAddingGregorianUnits()

        NSTimestamp startDate = currentDate().timestampByAddingGregorianUnits(0, 0, -ERXTimestampUtilities.dayOfMonth(currentDate()) + 1, 0, 0, 0);
        int year = ERXTimestampUtilities.yearOfCommonEra(startDate);
        int startOffset = ERXTimestampUtilities.dayOfYear(startDate);
        int daysInMonth = 31;
        if(ERXTimestampUtilities.monthOfYear(startDate) != 12) {
            daysInMonth = ERXTimestampUtilities.dayOfYear(startDate.timestampByAddingGregorianUnits(0, 1, -1, 0, 0, 0)) - startOffset + 1;
        }
        return _datesForYearStartDays(year, startOffset, daysInMonth);
    }
    public void goToToday() {
        setSelectedDate(today());
View Full Code Here

Examples of com.webobjects.foundation.NSTimestamp.timestampByAddingGregorianUnits()

        int howManyDaysAgo=dateIndex!=null ? daysAgoArray[dateIndex.intValue()] : 0;
        if(howManyDaysAgo==0) {
            displayGroup.queryMatch().removeObjectForKey(key);
            displayGroup.queryOperator().removeObjectForKey(key);
        } else {
            displayGroup.queryMatch().takeValueForKey(now.timestampByAddingGregorianUnits(0,0,-howManyDaysAgo,0,0,0), key);
            displayGroup.queryOperator().takeValueForKey(">", key);
        }
    }
}
View Full Code Here

Examples of com.webobjects.foundation.NSTimestamp.timestampByAddingGregorianUnits()

        public static NSArray lastNMonthsAsStringsArray(int numberDesiredMonths) {
            if (_lastNMonthsAsStringsArray == null) {
                NSMutableArray result = new NSMutableArray();
                NSTimestamp today = new NSTimestamp();
                for (int i=1;i<=numberDesiredMonths;i++)
                    result.addObject(today.timestampByAddingGregorianUnits(0, (i * -1), 0, 0, 0, 0).toString());
                _lastNMonthsAsStringsArray = result;
                log.debug("*********** result for lastNMonthsAsStringsArray = " + result);
            }
            return _lastNMonthsAsStringsArray;
        }
View Full Code Here

Examples of com.webobjects.foundation.NSTimestamp.timestampByAddingGregorianUnits()

        public static NSArray lastNMonthsArray(int numberDesiredMonths) {
            if (_lastNMonthsArray == null) {
                NSMutableArray result = new NSMutableArray();
                NSTimestamp today = new NSTimestamp();
                for (int i=1;i<=numberDesiredMonths;i++)
                    result.addObject(today.timestampByAddingGregorianUnits(0, (i * -1), 0, 0, 0, 0));
              //  log.debug("*********** today = " + today);
               // log.debug("*********** numberDesiredMonths = " + numberDesiredMonths);
                _lastNMonthsArray = result;
                log.debug("*********** result for lastNMonthsArray = " + result);
            }
View Full Code Here

Examples of com.webobjects.foundation.NSTimestamp.timestampByAddingGregorianUnits()

    aaBb = Employee.createEmployee(ec, "aa", "Bb", Boolean.FALSE, sortCo);
    Abba = Employee.createEmployee(ec, "Ab", "ba", Boolean.FALSE, sortCo);

   
    NSTimestamp now = new NSTimestamp();
    paycheck5000 = Paycheck.createPaycheck(ec, BigDecimal.valueOf(5000L), Boolean.FALSE, now.timestampByAddingGregorianUnits(0, 0, -14, 0, 0, 0), rufus);
    paycheck10000 = Paycheck.createPaycheck(ec, BigDecimal.valueOf(10000L), Boolean.FALSE, now.timestampByAddingGregorianUnits(0, 0, -7, 0, 0, 0), rufus);
    paycheck15000 = Paycheck.createPaycheck(ec, BigDecimal.valueOf(15000L), Boolean.FALSE, now, rufus);
    paychecks = new NSArray(paycheck5000, paycheck10000, paycheck15000);
   
   
View Full Code Here

Examples of com.webobjects.foundation.NSTimestamp.timestampByAddingGregorianUnits()

    Abba = Employee.createEmployee(ec, "Ab", "ba", Boolean.FALSE, sortCo);

   
    NSTimestamp now = new NSTimestamp();
    paycheck5000 = Paycheck.createPaycheck(ec, BigDecimal.valueOf(5000L), Boolean.FALSE, now.timestampByAddingGregorianUnits(0, 0, -14, 0, 0, 0), rufus);
    paycheck10000 = Paycheck.createPaycheck(ec, BigDecimal.valueOf(10000L), Boolean.FALSE, now.timestampByAddingGregorianUnits(0, 0, -7, 0, 0, 0), rufus);
    paycheck15000 = Paycheck.createPaycheck(ec, BigDecimal.valueOf(15000L), Boolean.FALSE, now, rufus);
    paychecks = new NSArray(paycheck5000, paycheck10000, paycheck15000);
   
   
    rufus.addToRoles(headHunter);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.