Formloom 4 - Date Formats

Formatting for Input Items

Formloom 4 uses the excellent Moment JS for date related input items. Below you will find the available tokens you can use to style your date format.

This format style WILL NOT PRODUCE the same results on global variables ( i.e. #fl-date# placeholder ) and data saving. Scroll down to bottom of page for how to format those items.

  Token Output
Month M 1 2 ... 11 12
  Mo 1st 2nd ... 11th 12th
  MM 01 02 ... 11 12
  MMM Jan Feb ... Nov Dec
  MMMM January February ... November December
Quarter Q 1 2 3 4
  Qo 1st 2nd 3rd 4th
Day of Month D 1 2 ... 30 31
  Do 1st 2nd ... 30th 31st
  DD 01 02 ... 30 31
Day of Year DDD 1 2 ... 364 365
  DDDo 1st 2nd ... 364th 365th
  DDDD 001 002 ... 364 365
Day of Week d 0 1 ... 5 6
  do 0th 1st ... 5th 6th
  dd Su Mo ... Fr Sa
  ddd Sun Mon ... Fri Sat
  dddd Sunday Monday ... Friday Saturday
Day of Week (Locale) e 0 1 ... 5 6
Day of Week (ISO) E 1 2 ... 6 7
Week of Year w 1 2 ... 52 53
  wo 1st 2nd ... 52nd 53rd
  ww 01 02 ... 52 53
Week of Year (ISO) W 1 2 ... 52 53
  Wo 1st 2nd ... 52nd 53rd
  WW 01 02 ... 52 53
Year YY 70 71 ... 29 30
  YYYY 1970 1971 ... 2029 2030
  Y 1970 1971 ... 9999 +10000 +10001
Note: This complies with the ISO 8601 standard for dates past the year 9999
Week Year gg 70 71 ... 29 30
  gggg 1970 1971 ... 2029 2030
Week Year (ISO) GG 70 71 ... 29 30
  GGGG 1970 1971 ... 2029 2030
AM/PM A AM PM
  a am pm
Hour H 0 1 ... 22 23
  HH 00 01 ... 22 23
  h 1 2 ... 11 12
  hh 01 02 ... 11 12
  k 1 2 ... 23 24
  kk 01 02 ... 23 24
Minute m 0 1 ... 58 59
  mm 00 01 ... 58 59
Second s 0 1 ... 58 59
  ss 00 01 ... 58 59
Fractional Second S 0 1 ... 8 9
  SS 00 01 ... 98 99
  SSS 000 001 ... 998 999
  SSSS ... SSSSSSSSS 000[0..] 001[0..] ... 998[0..] 999[0..]
Time Zone z or zz EST CST ... MST PST
Note: as of 1.6.0, the z/zz format tokens have been deprecated from plain moment objects. Read more about it here. However, they do work if you are using a specific time zone with the moment-timezone addon.
  Z -07:00 -06:00 ... +06:00 +07:00
  ZZ -0700 -0600 ... +0600 +0700
Unix Timestamp X 1360013296
Unix Millisecond Timestamp x 1360013296123

Originally found here: https://momentjs.com/docs/#/displaying/format/

 

Formatting for everything else

The format used for internal saving functions when date is used. The following elements will use this format

  • The #fl-date# placeholder in emails and receipts
  • MySQL date column
  • Google Sheet date column

This format is different from the date input items . This format is the PHP format. You will need to use PHP formatting symbols on this settings.

The following characters can be used:

  • d - The day of the month (from 01 to 31)
  • D - A textual representation of a day (three letters)
  • j - The day of the month without leading zeros (1 to 31)
  • l (lowercase 'L') - A full textual representation of a day
  • N - The ISO-8601 numeric representation of a day (1 for Monday, 7 for Sunday)
  • S - The English ordinal suffix for the day of the month (2 characters st, nd, rd or th. Works well with j)
  • w - A numeric representation of the day (0 for Sunday, 6 for Saturday)
  • z - The day of the year (from 0 through 365)
  • W - The ISO-8601 week number of year (weeks starting on Monday)
  • F - A full textual representation of a month (January through December)
  • m - A numeric representation of a month (from 01 to 12)
  • M - A short textual representation of a month (three letters)
  • n - A numeric representation of a month, without leading zeros (1 to 12)
  • t - The number of days in the given month
  • L - Whether it's a leap year (1 if it is a leap year, 0 otherwise)
  • o - The ISO-8601 year number
  • Y - A four digit representation of a year
  • y - A two digit representation of a year
  • a - Lowercase am or pm
  • A - Uppercase AM or PM
  • B - Swatch Internet time (000 to 999)
  • g - 12-hour format of an hour (1 to 12)
  • G - 24-hour format of an hour (0 to 23)
  • h - 12-hour format of an hour (01 to 12)
  • H - 24-hour format of an hour (00 to 23)
  • i - Minutes with leading zeros (00 to 59)
  • s - Seconds, with leading zeros (00 to 59)
  • u - Microseconds (added in PHP 5.2.2)
  • e - The timezone identifier (Examples: UTC, GMT, Atlantic/Azores)
  • I (capital i) - Whether the date is in daylights savings time (1 if Daylight Savings Time, 0 otherwise)
  • O - Difference to Greenwich time (GMT) in hours (Example: +0100)
  • P - Difference to Greenwich time (GMT) in hours:minutes (added in PHP 5.1.3)
  • T - Timezone abbreviations (Examples: EST, MDT)
  • Z - Timezone offset in seconds. The offset for timezones west of UTC is negative (-43200 to 50400)
  • c - The ISO-8601 date (e.g. 2013-05-05T16:34:42+00:00)
  • r - The RFC 2822 formatted date (e.g. Fri, 12 Apr 2013 12:01:05 +0200)
  • U - The seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)

 

Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk