Package com.ssgllc.fish.f.plaintime
Class F_PlainTime
java.lang.Object
com.ssgllc.fish.f.plaintime.F_PlainTime
A time of day - no date, no zone - produced by
PlainTimeBuilder.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
plainTime
The underlying time, for handing to Java APIs that want aLocalTime.
-
-
Constructor Details
-
F_PlainTime
-
-
Method Details
-
format
The time formatted with a pattern. Only the hour and minute are used, so a pattern asking for seconds renders them as zero.- Parameters:
pattern- the format pattern- Returns:
- the formatted time
Groovy example:
f().time.of("14:30").format("h:mm a")
Returns:
"2:30 PM"
SpEL example:
#f().time.of("14:30").format("h:mm a")
-
toIso
The time as an ISO-8601 string,HH:mm(orHH:mm:sswhen seconds are non-zero). This is also what the value serialises to.- Returns:
- the time in ISO-8601
Groovy example:
f().time.of("2:30pm").toIso()
Returns:
"14:30"
SpEL example:
#f().time.of("2:30pm").toIso()
-