Skip to content

Date & Time Formatting

  • YYYY – 4 digit year: 2020
  • YY – 2 digit year: 20
  • M MM – month number: 1..12
  • MMM MMM – month: Jan..December
  • D DD – day of month: 1..31
  • Do – day of month with ordinal: 1st..31st
  • ddd dddd – day of week: Tue Tuesday
  • H HH – hours (24 hour time): 0..23
  • h hh – hours (12 hour time): 0..12
  • a A – post or ante meridiem: am PM
  • m mm – minutes: 0..59
  • s ss – seconds: 0..59
  • Z ZZ zz – offset from UTC : +02:00 +0200
  • zz – timezone: Europe/London