Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.birt.core.data
Class DateTimeUtil

    java.lang.Object
      org.eclipse.birt.core.data.DateTimeUtil

    public class DateTimeUtil

extends java.lang.Object

Constructor Summary
`DateTimeUtil(com.ibm.icu.util.ULocale locale, com.ibm.icu.util.TimeZone timeZone)`

Method Summary
`java.util.Date` | `addDay(java.util.Date date, int num)` Add num days
`long` | `diffDay(java.util.Date d1, java.util.Date d2)` Return difference in number of days
`long` | `diffHour(java.util.Date d1, java.util.Date d2)` Return difference in number of hours
`long` | `diffMinute(java.util.Date d1, java.util.Date d2)` Return difference in number of minutes
`int` | `diffMonth(java.util.Date d1, java.util.Date d2)` Return difference in number of months
`int` | `diffQuarter(java.util.Date d1, java.util.Date d2)` Return difference in number of quarters
`long` | `diffSecond(java.util.Date d1, java.util.Date d2)` Return difference in number of seconds
`long` | `diffWeek(java.util.Date d1, java.util.Date d2)` Return difference in number of weeks
`int` | `diffYear(java.util.Date d1, java.util.Date d2)` Return difference in number of years
`int` | `month(java.util.Date d)` Month of date/time value d.
`int` | `quarter(java.util.Date d)` Quarter number (1 to 4) of date/time value d
`java.lang.String` | `weekDay(java.util.Date d)` Day the week.
`int` | `year(java.util.Date d)` 4-digit year number of date/time value d

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DateTimeUtil

    public DateTimeUtil(com.ibm.icu.util.ULocale locale,
                        com.ibm.icu.util.TimeZone timeZone)

Method Detail

### year

    public int year(java.util.Date d)

  4-digit year number of date/time value d

  Parameters:
    `d` -
  Returns:

### quarter

    public int quarter(java.util.Date d)

  Quarter number (1 to 4) of date/time value d

  Parameters:
    `d` -
  Returns:

### month

    public int month(java.util.Date d)

  Month of date/time value d. Return month number (1-12)

  Parameters:
    `d` -
  Returns:

### weekDay

    public java.lang.String weekDay(java.util.Date d)

  Day the week. Return a number 1 (Sunday) to 7 (Saturday).

  Parameters:
    `d` -
  Returns:

### diffYear

    public int diffYear(java.util.Date d1,
                        java.util.Date d2)

  Return difference in number of years

  Parameters:
    `d1` -
    `d2` -
  Returns:

### diffMonth

    public int diffMonth(java.util.Date d1,
                         java.util.Date d2)

  Return difference in number of months

  Parameters:
    `d1` -
    `d2` -
  Returns:

### diffQuarter

    public int diffQuarter(java.util.Date d1,
                           java.util.Date d2)

  Return difference in number of quarters

  Parameters:
    `d1` -
    `d2` -
  Returns:

### diffWeek

    public long diffWeek(java.util.Date d1,
                         java.util.Date d2)

  Return difference in number of weeks

  Parameters:
    `d1` -
    `d2` -
  Returns:

### diffDay

    public long diffDay(java.util.Date d1,
                        java.util.Date d2)

  Return difference in number of days

  Parameters:
    `d1` -
    `d2` -
  Returns:

### diffHour

    public long diffHour(java.util.Date d1,
                         java.util.Date d2)

  Return difference in number of hours

  Parameters:
    `d1` -
    `d2` -
  Returns:

### diffMinute

    public long diffMinute(java.util.Date d1,
                           java.util.Date d2)

  Return difference in number of minutes

  Parameters:
    `d1` -
    `d2` -
  Returns:

### diffSecond

    public long diffSecond(java.util.Date d1,
                           java.util.Date d2)

  Return difference in number of seconds

  Parameters:
    `d1` -
    `d2` -
  Returns:

### addDay

    public java.util.Date addDay(java.util.Date date,
                                 int num)

  Add num days

  Parameters:
    `date` -
    `num` -
  Returns:

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 Actuate Corp. All rights reserved.