Skip to content

Date and time patterns should follow DateTimeFormatter #1416

@ppkarwasz

Description

@ppkarwasz

In release 2.x date time patterns follow SimpleDateFormat with additional extensions provided by FastDateFormat and support for the n specifier for nanoseconds.

The exception is JSON Template Layout, which uses the format specifiers from DateTimeFormatter.

In release 3.x we should switch all format specifiers to those documented DateTimeFormatter.

The major differences are:

  • u means day-of-week in SDF and era in DTF,
  • SDF lacks L meaning month as text,
  • SDF lacks q and Q as quarter,
  • in DTF Z, ZZ and ZZZ all mean the same format for the time zone (e.g. -0800, +0000). In SDF (Commons Land version) ZZ uses the ISO 8601 format with a colon (e.g. -08:00, Z) and ZZZ adds a colon to the original Z format (e.g. -08:00, +00:00).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAdditions or updates to features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions