WTFormat!?

A simple utility for generating moment.js date format codes. By Ross Hill.

Get format

Enter the following date in your preferred format:


Moment format code:

What is it?

Ever find yourself asking, what moment.js date format is this?

WTFormat provides an easy way to generate the code to pass into moment().format that results in your desired date-time format.

Note: at this time, only English day & month names are supported.

How do I use it?

  1. Look at the date-time given
  2. Write that date-time in the format you want moment to output
  3. Click "generate"

It's that easy!

Examples

Format Code
Thu. September 6, 2012 at 8:45 AM ddd. MMMM D, YYYY [at] h:mm A
2012-09-06, 8 h 45 YYYY-MM-DD, H [h] mm
Sep. 6th '12 MMM. Do 'YY
The 6th of September, 2012 [The] Do [of] MMMM, YYYY