Skip to content

uniphore/kai-date-parse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 

Repository files navigation

date-parse

JS Date parse extension that not only understands more formats, but also converts relative dates (like "20 days ago") into a timestamp.

License

Apache 2.0

Usage

To use, include the JavaScript file as follows:

<script type="text/javascript" src="date.parse.js"></script>

Examples

new Date(Date.parse("20s")); // Sun Jun 02 2013 16:15:47 GMT+0300 (IDT)
new Date(Date.parse("5 days ago")); // Tue May 28 2013 16:16:11 GMT+0300 (IDT)
new Date(Date.parse("15 May")); // Tue May 15 2001 00:00:00 GMT+0300 (IDT)
new Date(Date.parse("Thursday")); // Thu Jun 06 2013 16:16:21 GMT+0300 (IDT)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published