|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jopendocument.util.TimeUtils
public class TimeUtils
| Constructor Summary | |
|---|---|
TimeUtils()
|
|
| Method Summary | |
|---|---|
static java.util.Calendar |
copyLocalTime(java.util.Calendar from,
java.util.Calendar to)
Copy the local time from one calendar to another. |
static java.math.BigDecimal |
getSeconds(javax.xml.datatype.Duration d)
Get non-null seconds with the the correct class. |
static javax.xml.datatype.DatatypeFactory |
getTypeFactory()
|
static long |
normalizeLocalTime(java.util.Calendar cal)
Normalize cal so that any Calendar with the same local time have the same
result. |
static javax.xml.datatype.Duration |
timePartToDuration(java.util.Calendar cal)
Convert the time part of a calendar to a duration. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TimeUtils()
| Method Detail |
|---|
public static final javax.xml.datatype.DatatypeFactory getTypeFactory()
public static final java.math.BigDecimal getSeconds(javax.xml.datatype.Duration d)
d - a duration.
null.Duration.getField(javax.xml.datatype.DatatypeConstants.Field),
Duration.getMinutes()public static final javax.xml.datatype.Duration timePartToDuration(java.util.Calendar cal)
cal - a calendar, e.g. 23/12/2011 11:55:33.066 GMT+02.
public static final long normalizeLocalTime(java.util.Calendar cal)
cal so that any Calendar with the same local time have the same
result. If you don't need a Calendar this is faster than
copyLocalTime(Calendar, Calendar).
cal - a calendar, e.g. 0:00 CEST.
public static final java.util.Calendar copyLocalTime(java.util.Calendar from,
java.util.Calendar to)
from - the source calendar, e.g. 23/12/2011 11:55:33.066 GMT-12.to - the destination calendar, e.g. 01/01/2000 0:00 GMT+13.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||