Package com.ibm.icu.util

Examples of com.ibm.icu.util.GregorianCalendar.fieldDifference()


        Date secondDate = getDateFromValue(secondValue);

        GregorianCalendar calendar =
                new GregorianCalendar(TimeZone.getTimeZone("GMT"));
        calendar.setTime(secondDate);
        return new NumberValue(calendar.fieldDifference(firstDate, Calendar.DATE));
    }

    /**
     * Converts the given value to date. The value must be of type date or datetime.
     *
 
View Full Code Here


  public int[] getDailyModifiedNoteCount(final java.util.Date since, final Set<SelectOption> noteClass) {
    Date now = new Date();
    Calendar cal = new GregorianCalendar();
    cal.setTime(since);
    int diffDays = cal.fieldDifference(now, Calendar.DAY_OF_YEAR);
    int[] result = null;
    if (diffDays > DAILY_ARRAY_LIMIT) {
      result = new int[DAILY_ARRAY_LIMIT];
    } else {
      result = new int[diffDays];
View Full Code Here

    Date secondDate = getDateFromValue(secondValue);

    GregorianCalendar calendar =
        new GregorianCalendar(TimeZone.getTimeZone("GMT"));
    calendar.setTime(secondDate);
    return new NumberValue(calendar.fieldDifference(firstDate, Calendar.DATE));
  }

  /**
   * Converts the given value to date. The value must be of type date or datetime.
   *
 
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.