public class PointOfTime extends Object implements Serializable
Date
with a more powerful string-arg constructor.Constructor and Description |
---|
PointOfTime()
The current time, a.k.a 'now'.
|
PointOfTime(long ms) |
PointOfTime(String s)
Accepts point-of-time specifications in any of the following formats:
1999-12-31T23:59:59 (the "T " separates the date from the time-of-day)
1999-12-31T23:59
1999-12-31 (midnight on the specified date)
|
Modifier and Type | Method and Description |
---|---|
PointOfTime |
add(double seconds) |
PointOfTime |
add(Duration duration) |
long |
milliseconds() |
Duration |
subtract(PointOfTime other) |
String |
toString() |
public PointOfTime()
public PointOfTime(String s) throws ParseException
1999-12-31T23:59:59
(the "T
" separates the date from the time-of-day)1999-12-31T23:59
1999-12-31
(midnight on the specified date)ParseException
public PointOfTime(long ms)
ms
- The number of non-leap milliseconds since 1970-01-01 00:00:00 UTCpublic long milliseconds()
public PointOfTime add(double seconds)
PointOfTime
public PointOfTime add(Duration duration)
PointOfTime
public Duration subtract(PointOfTime other)
this
Copyright © 2018 Arno Unkrig. All rights reserved.