2.0.0 • Published 5 years ago
epoca.js v2.0.0
⌛ epoca.js
Install
Install with npm
$ npm i epoca.js --save
Usage
const Epoca = require('epoca.js')
const epoch = new Date() // Example: 2019-07-28T16:03:44.608Z
const epochMs = epoch.getTime() // Current date in milliseconds.
let addHrs = epoca.addHours(now, 5) // Will add 5 hours to the current epoch.
let subHrs = epoca.subHours(now, 5) // Will subtract 5 hours to the current epoch.
let future = new Date(1564415200000) // 2019-07-29T15:46:40.000Z
let relative = epoca.relativeDate(now, future) // "in 24 hours"
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Author
License
Copyright © 2019 Licensed under the ISC license.
This file was generated by readme-generator on July 28, 2019.