Class PlainDateBuilder

java.lang.Object
com.ssgllc.fish.f.plaindate.PlainDateBuilder

public class PlainDateBuilder extends Object
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 Details

    • PlainDateBuilder

      public PlainDateBuilder()
  • Method Details

    • of

      public F_PlainDate of(String date)
      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

      public F_PlainDate of(LocalDate date)
      A date from a LocalDate - 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

      public F_PlainDate of(Map<String,Object> obj)
      A date from a map of year, month and day, 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

      public F_PlainDate of(String year, String month, String day)
      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

      public F_PlainDate of(int year, int month, int day)
      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

      public F_PlainDate 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()