java.lang.Object
io.ciera.runtime.api.types.TimeStamp
io.ciera.runtime.api.types.Date
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DatefromString(String s) Parse an ISO-8601 date/time string.intgetDay()Get the day of the month of this date.intgetHour()Get the hour of the day of this date.intGet the minute of the hour of this date.intgetMonth()Get the month of this Date.intGet the second of the minute of this date.intgetYear()Get the year AD of this Date.static Datenow(SystemClock clock) Create a new instance of Date from the current time and epoch set in the system clock.toString()Override the 'toString' method to produce an ISO-8601 compliant date/time string.
-
Field Details
-
ZERO
-
-
Constructor Details
-
Date
public Date() -
Date
public Date(long timestamp) -
Date
-
Date
-
-
Method Details
-
getYear
public int getYear()Get the year AD of this Date.- Returns:
- the year number.
-
getMonth
public int getMonth()Get the month of this Date. Values are 1-indexed meaning January=1, February=2, etc.- Returns:
- the month number.
-
getDay
public int getDay()Get the day of the month of this date.- Returns:
- the day number.
-
getHour
public int getHour()Get the hour of the day of this date.- Returns:
- the hour number.
-
getMinute
public int getMinute()Get the minute of the hour of this date.- Returns:
- the minute number.
-
getSecond
public int getSecond()Get the second of the minute of this date.- Returns:
- the second number.
-
now
Create a new instance of Date from the current time and epoch set in the system clock.- Parameters:
clock- The clock to reference.- Returns:
- A constructed Date instance.
-
toString
Override the 'toString' method to produce an ISO-8601 compliant date/time string. -
fromString
Parse an ISO-8601 date/time string.- Parameters:
s- The input string- Returns:
- an instance of Date representative of the input string.
-