This is a Node.JS module to pretty-print dates in a variety of standard formats. It includes the ISO8601 and RFC2822 formats and a port of the strftime library that I wrote for YUI based on the Open Group specification defined at http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html (not including modified conversion specifiers i.e., Ex and Ox).
This implementation returns to the original module, includes all the enhancements added as part of YUI and adds a few of its own.
- The C library available on a system may not necessarily implement all the format specifiers from the Open Group spec.
- There may be some platforms that node works on that do not have a strftime function.
var strftime=require('prettydate').strftime; var d=new Date(); console.log(strftime(d, "%c"));
$ npm install prettydate