Date and time formatting for humans
Jeremy Ashkenas (Underscore.js, CoffeeScript) posted a good idea to Twitter today:
Date/Time library feature request: Add a formatLike(“Jan. 26, 2015”) function
Because no human should ever have to memorize %d %SS %GARBAGE
— Jeremy Ashkenas (@jashkenas) January 26, 2015
I couldn't agree more. We've built tools to help ourselves conjure the correct incantations to get the format we want, but why not just show the computer what we want and let it do the pattern matching?
Jeremy wasn't the first person to have this idea. He wasn't even the first Jeremy to have this idea. Enter Stamp, which Jeremy Weiskotten dubs:
Date and time formatting for humans.
Stamp basically does exactly what we'd love it to do:
Format dates and times based on human-friendly examples, not arcane strftime directives.
And to answer the $60,000 question: Yes, it even handles ordinal dates.
After learning of Stamp, Ashkenas challenged the JavaScript community to build something similar. I'll go one further: every language needs a library likes this. Build one and we'll help you get the word out.
Discussion
Sign in or Join to comment or subscribe