Docs    Facebook    Documentation

Date Formatting Reference

You can use the reference below to create your own custom date format. Below are a few examples and a reference for what each letter represents.

F jS, g:i a = July 25th, 5:30 pm

F jS = July 25th

D F jS = Thu July 25th

l F jS = Thursday July 25th

D M jS, Y = Thu Jul 25th, 2013

l F jS, Y = Thursday July 25th, 2013

l F jS, Y – g:i a = Thursday July 25th, 2013 – 5:30 pm

l M jS, y = Thursday Jul 25th, 13

m.d.y = 07.25.13

m/d/y = 07/25/13

Time:

  • a: am or pm depending on the time
  • A: AM or PM depending on the time
  • g: Hour without leading zeroes. Values are 1 through 12.
  • G: Hour in 24-hour format without leading zeroes. Values are 0 through 23.
  • h: Hour with leading zeroes. Values 01 through 12.
  • H: Hour in 24-hour format with leading zeroes. Values 00 through 23.
  • i: Minute with leading zeroes. Values 00 through 59.
  • s: Seconds with leading zeroes. Values 00 through 59.

Day:

  • d: Day of the month with leading zeroes. Values are 01 through 31.
  • j: Day of the month without leading zeroes. Values 1 through 31
  • D: Day of the week abbreviations. Sun through Sat
  • l: Day of the week. Values Sunday through Saturday
  • w: Day of the week without leading zeroes. Values 0 through 6.
  • z: Day of the year without leading zeroes. Values 0 through 365.

Month:

  • m: Month number with leading zeroes. Values 01 through 12
  • n: Month number without leading zeroes. Values 1 through 12
  • M: Abbreviation for the month. Values Jan through Dec
  • F: Normal month representation. Values January through December.
  • t: The number of days in the month. Values 28 through 31.

Year:

  • L: 1 if it’s a leap year and 0 if it isn’t.
  • Y: A four digit year format
  • y: A two digit year format. Values 00 through 99.

Event “End” date

When using a built-in date format for events, the plugin will hide the end date if the event ends on the same day that it starts.  For example, instead of using “June 1st, 5pm – June 1st 9pm” it will simply use “June 1st, 5pm – 9pm”.

However, if you are using your own custom date format then the plugin doesn’t know which part of the end date to hide.  To get around this, you can use the {hide-start}{hide-end} tags in the custom date to let the plugin know which part you want to hide. For example, {hide-start}F jS, {hide-end}g:i a". The plugin will then hide the text which is inside the  {hide-start}{hide-end}  tags in the end date.

support

Couldn’t find your answer in the docs?

Contact Support

Was this article helpful?