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

## com.caucho.util
Class QDate

    java.lang.Object
      |
      +--com.caucho.util.QDate

public class QDate
extends java.lang.Object

Resin Date object

Field Summary
`static int` | `DAY`
`static int` | `DAY_OF_MONTH`
`static int` | `DAY_OF_WEEK`
`static int` | `HOUR`
`static int` | `MILLISECOND`
`static int` | `MINUTE`
`static int` | `MONTH`
`static int` | `SECOND`
`static int` | `TIME`
`static int` | `TIME_ZONE`
`static int` | `YEAR`

Constructor Summary
`QDate()` Creates the native Object object

Method Summary
`long` | `calculate(long time, boolean isLocal)`
`java.lang.Object` | `clone()`
`CharBuffer` | `format(CharBuffer cb, java.lang.String format)` Format the date using % escapes: %aday of week (short) %Aday of week (verbose) %bday of month (short) %Bday of month (verbose) %cJava locale date %dday of month (two-digit) %H24-hour (two-digit) %I12-hour (two-digit) %jday of year (three-digit) %mmonth (two-digit) %Mminutes %pam/pm %Sseconds %smilliseconds %Wweek in year (three-digit) %wday of week (one-digit) %yyear (two-digit) %Yyear (four-digit) %Ztime zone (name) %ztime zone (+/-0800)
`static java.lang.String` | `format(long time)`
`static java.lang.String` | `format(long time, java.lang.String format)`
`java.lang.String` | `format(java.lang.String format)`
`static CharBuffer` | `formatLocal(CharBuffer cb, long time, java.lang.String format)` Formats a time in the local time zone.
`static java.lang.String` | `formatLocal(long time)`
`static java.lang.String` | `formatLocal(long time, java.lang.String format)` Formats a time in the local time zone.
`long` | `get(int field)`
`int` | `getDayOfMonth()`
`int` | `getDayOfWeek()`
`static QDate` | `getGlobalDate()` Global date must be synchronized before you can do anything on it.
`int` | `getMonth()`
`long` | `getTime()`
`long` | `getYear()`
`long` | `getZoneOffset()`
`long` | `parseDate(java.lang.String string)`
`long` | `parseDateToGMT(java.lang.String string)`
`java.lang.String` | `printDate()`
`void` | `printDate(CharBuffer cb)`
`void` | `printDate(WriteStream os)`
`java.lang.String` | `printISO8601()`
`java.lang.String` | `printISO8601Date()`
`java.lang.String` | `printLocaleDate()`
`long` | `set(int field, long value)`
`long` | `setDate(long year, long month, long day)` Sets date in GMT.
`long` | `setTime(long time)`
`long` | `setTime(long hour, long minute, long second, long ms)`
`java.lang.String` | `toString()`

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

Field Detail

### YEAR

    public static final int YEAR

### MONTH

    public static final int MONTH

### DAY_OF_MONTH

    public static final int DAY_OF_MONTH

### DAY

    public static final int DAY

### DAY_OF_WEEK

    public static final int DAY_OF_WEEK

### HOUR

    public static final int HOUR

### MINUTE

    public static final int MINUTE

### SECOND

    public static final int SECOND

### MILLISECOND

    public static final int MILLISECOND

### TIME

    public static final int TIME

### TIME_ZONE

    public static final int TIME_ZONE

Constructor Detail

### QDate

    public QDate()

  Creates the native Object object

Method Detail

### getZoneOffset

    public long getZoneOffset()

### printDate

    public java.lang.String printDate()

### printDate

    public void printDate(CharBuffer cb)

### printDate

    public void printDate(WriteStream os)
                   throws java.io.IOException

### printISO8601

    public java.lang.String printISO8601()

### printISO8601Date

    public java.lang.String printISO8601Date()

### format

    public static java.lang.String format(long time,
                                          java.lang.String format)

### format

    public static java.lang.String format(long time)

### formatLocal

    public static java.lang.String formatLocal(long time,
                                               java.lang.String format)

  Formats a time in the local time zone.
  Parameters:
    `time` - in milliseconds, GMT, from the epoch.
    `format` - formatting string.

### formatLocal

    public static java.lang.String formatLocal(long time)

### formatLocal

    public static CharBuffer formatLocal(CharBuffer cb,
                                         long time,
                                         java.lang.String format)

  Formats a time in the local time zone.
  Parameters:
    `time` - in milliseconds, GMT, from the epoch.
    `format` - formatting string.

### getGlobalDate

    public static QDate getGlobalDate()

  Global date must be synchronized before you can do anything on it.

### format

    public java.lang.String format(java.lang.String format)

### format

    public CharBuffer format(CharBuffer cb,
                             java.lang.String format)

  Format the date using % escapes:

  %a | day of week (short)
  %A | day of week (verbose)
  %b | day of month (short)
  %B | day of month (verbose)
  %c | Java locale date
  %d | day of month (two-digit)
  %H | 24-hour (two-digit)
  %I | 12-hour (two-digit)
  %j | day of year (three-digit)
  %m | month (two-digit)
  %M | minutes
  %p | am/pm
  %S | seconds
  %s | milliseconds
  %W | week in year (three-digit)
  %w | day of week (one-digit)
  %y | year (two-digit)
  %Y | year (four-digit)
  %Z | time zone (name)
  %z | time zone (+/-0800)

### printLocaleDate

    public java.lang.String printLocaleDate()

### parseDateToGMT

    public long parseDateToGMT(java.lang.String string)
                        throws java.lang.Exception

### parseDate

    public long parseDate(java.lang.String string)
                   throws java.lang.Exception

### calculate

    public long calculate(long time,
                          boolean isLocal)

### setTime

    public long setTime(long time)

### setDate

    public long setDate(long year,
                        long month,
                        long day)

  Sets date in GMT.
  Parameters:
    `year` -
    `month` - where January = 0
    `day` - day of month where the 1st = 0

### setTime

    public long setTime(long hour,
                        long minute,
                        long second,
                        long ms)

### getTime

    public long getTime()

### getYear

    public long getYear()

### getMonth

    public int getMonth()

### getDayOfMonth

    public int getDayOfMonth()

### getDayOfWeek

    public int getDayOfWeek()

### get

    public long get(int field)

### set

    public long set(int field,
                    long value)

### clone

    public java.lang.Object clone()

  Overrides:
    `clone` in class `java.lang.Object`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

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