Skip to content

npm package that converts between normal datetime to iso datetime format.

License

Notifications You must be signed in to change notification settings

batraabhishek/datetime-converter-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

datetime-converter-nodejs

npm package that converts between normal datetime to iso datetime format.

INSTALL:

$ npm install datetime-converter-nodejs

USAGE:

simple functions

var DateTime = require('datetime-converter-nodejs');
var time1 = 'Sat May 16 2015 16:30:13 GMT+0530 (IST)'
var time2 = 'Sat May 16 2015 15:30:13 GMT+0530 (IST)';
var isoTime1 = '2015-05-16T11:28:00.322Z';
var isoTime2 =  '2015-05-16T11:26:00.322Z';

console.log(DateTime.timeDiff(time1, time2));				// 3600
console.log(DateTime.isoTimeDiff(isoTime1, isoTime2));		// 120
console.log(DateTime.isoString(time1));						// 2015-05-16T11:00:13.000Z
console.log(DateTime.dateString(isoTime1))					// Sat May 16 2015 16:58:00 GMT+0530 (IST)

About

npm package that converts between normal datetime to iso datetime format.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published