Twix.js allows you to work with date ranges
Twix is a comprehensive JS library for working with date ranges, and includes a customizable smart formatter. It's written in CoffeeScript and it depends on Moment.js.
var t = ;t; //=> Jan 25, 1982, 9:30 AM - 1:30 PMt; //=> truet; //=> "4 hours"t; //=> 1t; //=> another range
See the documentation for more.
You can find comprehensive docs here:
Breaking change in 1.0.0: Removed the deprecated
showDate smart formatter options. Use
If you want to build and test Twix for yourself,
make wraps everything you need:
||Install dependencies (same as
||Run Mocha suite|
Patches are welcome!
.jsfiles in the patch; they're much harder to merge. I'll generate them when I cut the release.
Copyright 2012-2015 Isaac Cambron and contributors. Distributed under the MIT License. See LICENSE for details.