Chronic for Javascript?

I am looking for something like a Ruby Chronic library, but for Javascript. The main thing I need to do is parse natural time, not dates. For instance:

Typing   Would Give
------   ----------
8a       08:00
8:30p    20:30
8:01 AM  08:01
21:22    21:22
noon     12:00
midnight 00:00

I could write it myself, but before I leave and do it, I would like to know if there is anything already available.

I already use jQuery, so if there is a plugin, it will also be hoopy.

Thank!

+3
source share
3 answers

Instead of my previous answer recommending Date.js, I would like to update my answer by recommending Moment.js instead . This is a stable project that is still in active development. In addition, it is much more functional and has an excellent API. :)

+2
source

Date.JS - JS .

+2
+2
source

All Articles