time-factory2
v1.0.1
Published
manipulate time
Downloads
1
Readme
Time Factory 2
manipulate time
difference between to date in
difIn(unit, date1, date2)
- @param {string} unit: [ seconds / minutes / hours / days / months / years ]
- @param {Date} date1
- @param {Date} date2
get difference in
timeFactory.difIn('minutes', date1, date2);
cal(verb, number, unit, date)
- @param {string} verb [add / remove ]
- @param {number} number. what to add or remove
- @param {string} unit: [ seconds / minutes / hours / days / months / years ]
- @param {Date} date
timeFactory.cal('add', 4, 'days', new Date());
will return the date 4 days from now
to(unit, date)
- @param {string} unit: [ seconds / minutes / hours / days / months / years ]
- @param {Date} date
conver date to hours
timeFactory.to('hours', new Date());