|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Calendar java.util.GregorianCalendar jsdai.lang.SdaiCalendar
This class gives methods to convert time values from long
to
String
representation and vice versa.
The format of the time description by string is specified in ISO 8601.
Field Summary |
Fields inherited from class java.util.GregorianCalendar |
AD, BC |
Fields inherited from class java.util.Calendar |
AM, AM_PM, APRIL, AUGUST, DAY_OF_YEAR, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_WEEK_IN_MONTH, DATE, DECEMBER, DST_OFFSET, ERA, FEBRUARY, FIELD_COUNT, FRIDAY, HOUR, HOUR_OF_DAY, YEAR, JANUARY, JULY, JUNE, MAY, MARCH, MILLISECOND, MINUTE, MONDAY, MONTH, NOVEMBER, OCTOBER, PM, SATURDAY, SECOND, SEPTEMBER, SUNDAY, THURSDAY, TUESDAY, UNDECIMBER, WEDNESDAY, WEEK_OF_YEAR, WEEK_OF_MONTH, ZONE_OFFSET |
Constructor Summary | |
SdaiCalendar()
Creates a new SdaiCalendar . |
Method Summary | |
java.lang.String |
longToTimeStamp(long time)
Converts the time value from long to String
representation. |
long |
timeStampToLong(java.lang.String time_stamp)
Converts the time value specified by String to
long equivalent. |
Methods inherited from class java.util.GregorianCalendar |
add, equals, getActualMaximum, getActualMinimum, getGreatestMinimum, getGregorianChange, getLeastMaximum, getMaximum, getMinimum, hashCode, isLeapYear, roll, roll, setGregorianChange |
Methods inherited from class java.util.Calendar |
after, before, clear, clear, clone, get, getAvailableLocales, getFirstDayOfWeek, getInstance, getInstance, getInstance, getInstance, getMinimalDaysInFirstWeek, getTime, getTimeInMillis, getTimeZone, isLenient, isSet, set, set, set, set, setFirstDayOfWeek, setLenient, setMinimalDaysInFirstWeek, setTime, setTimeInMillis, setTimeZone, toString |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SdaiCalendar()
SdaiCalendar
.
Method Detail |
public long timeStampToLong(java.lang.String time_stamp)
String
to
long
equivalent. The format of the description by string
is specified in ISO 8601 (for details, see ISO 10303-21::9.2.2 file_name).
Example:
SdaiCalendar cal = ...;
String time = "2000-06-25T06:04:02";
long time_as_long = cal.timeStampToLong(time);
System.out.println("Time: " + time_as_long);
The following line will be printed:
Time: 961909442000
time_stamp
- the time value written as string according to rules
specified in ISO 8601.
long
variable.longToTimeStamp(long)
,
"ISO 10303-21::9.2.2 file_name."public java.lang.String longToTimeStamp(long time)
long
to String
representation. The format of the time description by string
is specified in ISO 8601 (for details, see ISO 10303-21::9.2.2 file_name).
Example:
SdaiCalendar cal = ...;
long time_as_long = 961909442886;
String time = cal.longToTimeStamp(time_as_long);
System.out.println("Time: " + time);
The following line will be printed:
Time: 2000-06-25T06:04:02
time
- the time as long
number.
timeStampToLong(java.lang.String)
,
"ISO 10303-21::9.2.2 file_name."
|
Copyright © LKSoftWare GmbH, 1999-2008 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |