Skip to content

generate rfc3339-compliant timestamps from date objects

License

Notifications You must be signed in to change notification settings

Tubbz-alt/internet-timestamp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

internet-timestamp

convert javascript date objects into rfc3339-compliant timestamp strings

rfc3339 is mandated by atom rss.

browser support

build status

example

var timestamp = require('internet-timestamp');
var d = new Date('Thu Mar 14 19:16:19 2013 -0700');
console.log(timestamp(d));
$ node example/stamp.js
2013-03-14T19:16:19-07:00

methods

var timestamp = require('internet-timestamp')

timestamp(date)

Return a rfc3339-compliant timestamp from the Date instance or Date()-parseable string date.

install

With npm do:

npm install internet-timestamp

To use this module in the browser, use browserify.

license

MIT

About

generate rfc3339-compliant timestamps from date objects

Resources

License

Stars

Watchers

Forks

Packages

No packages published