Package com.ssgllc.fish.f.plaindate
Class PlainDateBuilder
java.lang.Object
com.ssgllc.fish.f.plaindate.PlainDateBuilder
Builds a calendar date to start an
f().date chain.
Reached as a field: f().date. Every method returns an F_PlainDate, which is
where formatting, comparison and arithmetic continue. A date here carries no time and no zone,
so it is the right type for a birth date or a due date - use f().instant when the moment
matters.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionof(int year, int month, int day) A date from year, month and day as integers.A date parsed from an ISO-8601 string (yyyy-MM-dd).A date from year, month and day as strings - the overload for values arriving from form fields or an import row.A date from aLocalDate- the overload to use when an entity field is already a date.A date from a map ofyear,monthandday, each an integer or a numeric string.today()Today's date in the system default zone.
-
Constructor Details
-
PlainDateBuilder
public PlainDateBuilder()
-
-
Method Details
-
of
A date parsed from an ISO-8601 string (yyyy-MM-dd).- Returns:
- a date to continue the chain from
Groovy example:
f().date.of("2026-01-15").toIso()
Returns:
"2026-01-15"
SpEL example:
#f().date.of("2026-01-15").toIso()
-
of
A date from aLocalDate- the overload to use when an entity field is already a date.- Returns:
- a date to continue the chain from
Groovy example:
f().date.of(entity.birthDate).format("MMMM d, yyyy")
Returns:
"January 15, 2026"
SpEL example:
#f().date.of(entity.birthDate).format("MMMM d, yyyy")
-
of
A date from a map ofyear,monthandday, each an integer or a numeric string. Every one of the three is required; a missing key throws.- Returns:
- a date to continue the chain from
Groovy example:
f().date.of(['year': 2026, 'month': 1, 'day': 15]).toIso()
Returns:
"2026-01-15"
SpEL example:
#f().date.of({'year': 2026, 'month': 1, 'day': 15}).toIso()
-
of
A date from year, month and day as strings - the overload for values arriving from form fields or an import row.- Returns:
- a date to continue the chain from
Groovy example:
f().date.of("2026", "1", "15").toIso()
Returns:
"2026-01-15"
SpEL example:
#f().date.of("2026", "1", "15").toIso()
-
of
A date from year, month and day as integers.- Returns:
- a date to continue the chain from
Groovy example:
f().date.of(2026, 1, 15).toIso()
Returns:
"2026-01-15"
SpEL example:
#f().date.of(2026, 1, 15).toIso()
-
today
Today's date in the system default zone.- Returns:
- today, as a date to continue the chain from
Groovy example:
f().date.today().toIso()
Returns:
"2026-08-21"
SpEL example:
#f().date.today().toIso()
-