Package com.ssgllc.fish.f.plaindate
Class F_PlainDate
java.lang.Object
com.ssgllc.fish.f.plaindate.F_PlainDate
-
Field Summary
FieldsModifier and TypeFieldDescriptionMove forwards:f().date.today().add.days(30).Distance to another date:f().date.today().elapsed.years.after(birthDate).Comparisons:f().date.today().is.after("2026-01-01").The underlying date, for handing to Java APIs that want aLocalDate.Move backwards:f().date.today().subtract.months(6). -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
plainDate
The underlying date, for handing to Java APIs that want aLocalDate. -
is
Comparisons:f().date.today().is.after("2026-01-01"). -
elapsed
Distance to another date:f().date.today().elapsed.years.after(birthDate). -
add
Move forwards:f().date.today().add.days(30). -
subtract
Move backwards:f().date.today().subtract.months(6).
-
-
Constructor Details
-
F_PlainDate
-
-
Method Details
-
toIso
The date as an ISO-8601 string,yyyy-MM-dd. This is also what the value serialises to in JSON, so it is the form to use when setting a field or building a payload.- Returns:
- the date in ISO-8601
Groovy example:
f().date.today().toIso()
Returns:
"2026-08-21"
SpEL example:
#f().date.today().toIso()
-
format
The date formatted with a pattern in a given locale. The pattern is the JavaScript-style one the front end uses, so the same pattern renders identically on both sides.- Parameters:
pattern- the format patternlocale- a BCP 47 locale tag, e.g."es-US"- Returns:
- the formatted date
Groovy example:
f().date.today().format("MMMM d, yyyy", "es-US")
Returns:
"agosto 21, 2026"
SpEL example:
#f().date.today().format("MMMM d, yyyy", "es-US")
-
format
The date formatted with a pattern in the US locale. Useformat(String, String)to choose a different locale.- Parameters:
pattern- the format pattern- Returns:
- the formatted date
Groovy example:
f().date.today().format("MM/dd/yyyy")
Returns:
"08/21/2026"
SpEL example:
#f().date.today().format("MM/dd/yyyy")
-