Date format

Sometimes an client requests that date is displayed in a unique format. This can be achieved via date format configuration option in the webapp manifest.

Default date format: DD/MM/YYYY

Example webapp manifest

{
  "version": "1.0",
  "schema": {
    "config": {
      "date_format": "DD/MM/YYYY"
    }
  }
}

date_format accepts string values. Respective keywords are replaced with date values upon output. All other characters are left unchanged.

Key
Example
Description

DD

01

Day of the month, 2 digits with leading zeros

D

1

Day of the month without leading zeros

MM

07

Numeric representation of a month, with leading zeros

M

7

Numeric representation of a month, without leading zeros

YYYY

1990

A full numeric representation of a year, 4 digits

HH

01

24-hour format of an hour with leading zeros

mm

02

Minutes with leading zeros

ss

03

Seconds with leading zeros

SSS

008

Milliseconds, 3 digits with leading zeros

Last updated