com.sun.cldc.util.j2me
Class CalendarImpl
java.lang.Object
java.util.Calendar
com.sun.cldc.util.j2me.CalendarImpl
public class CalendarImpl
- extends Calendar
This class is an implementation of the subsetted
CLDC 1.1 Calendar class.
- See Also:
Calendar,
TimeZone
| Fields inherited from class java.util.Calendar |
AM, AM_PM, APRIL, AUGUST, DATE, DAY_OF_MONTH, DAY_OF_WEEK, DECEMBER, FEBRUARY, fields, FRIDAY, HOUR, HOUR_OF_DAY, isSet, JANUARY, JULY, JUNE, MARCH, MAY, MILLISECOND, MINUTE, MONDAY, MONTH, NOVEMBER, OCTOBER, PM, SATURDAY, SECOND, SEPTEMBER, SUNDAY, THURSDAY, time, TUESDAY, WEDNESDAY, YEAR |
| Methods inherited from class java.util.Calendar |
after, before, equals, get, getInstance, getInstance, getTime, getTimeInMillis, getTimeZone, set, setTime, setTimeInMillis, setTimeZone, toString |
CalendarImpl
public CalendarImpl()
computeFields
protected void computeFields()
- Converts UTC as milliseconds to time field values.
- Specified by:
computeFields in class Calendar
toString
public static String toString(Calendar calendar)
- Converts this
Date object to a String
of the form:
dow mon dd hh:mm:ss zzz yyyy
where:
- dow is the day of the week (Sun, Mon, Tue, Wed,
Thu, Fri, Sat).
- mon is the month (Jan, Feb, Mar, Apr, May, Jun,
Jul, Aug, Sep, Oct, Nov, Dec).
- dd is the day of the month (01 through
31), as two decimal digits.
- hh is the hour of the day (00 through
23), as two decimal digits.
- mm is the minute within the hour (00 through
59), as two decimal digits.
- ss is the second within the minute (00 through
61, as two decimal digits.
- zzz is the time zone (and may reflect daylight savings
time). If time zone information is not available,
then zzz is empty - that is, it consists
of no characters at all.
- yyyy is the year, as four decimal digits.
- Returns:
- a string representation of this date.
toISO8601String
public static String toISO8601String(Calendar calendar)
- Converts this
Date object to a String.
The output format is as follows:
yyyy MM dd hh mm ss +zzzz
where:
- yyyy
is the year, as four decimal digits.
Year values larger than - 9999
will be truncated
to - 9999
.
- MM
is the month (- 01
through - 12
),
as two decimal digits.
- dd
is the day of the month (- 01
through
- 31
), as two decimal digits.
- hh
is the hour of the day (- 00
through
- 23
), as two decimal digits.
- mm
is the minute within the hour (- 00
through - 59
), as two decimal digits.
- ss
is the second within the minute (- 00
through - 59
), as two decimal digits.
- zzzz
is the time zone offset in hours and minutes
(four decimal digits - "hhmm"
) relative to GMT,
preceded by a "+" or "-" character (- -1200
through - +1200
).
For instance, Pacific Standard Time zone is printed
as - -0800
. GMT is printed as - +0000
.
- Returns:
- a string representation of this date.
computeTime
protected void computeTime()
- Converts time field values to UTC as milliseconds.
- Specified by:
computeTime in class Calendar
- Throws:
IllegalArgumentException - if any fields are invalid.
Copyright © 2010 Livescribe Inc. All Rights Reserved.
Confidential and subject to NDA.