epoca.js
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

⌛ 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.

Readme

Keywords

none

Package Sidebar

Install

npm i epoca.js

Weekly Downloads

0

Version

2.0.0

License

ISC

Unpacked Size

15.1 kB

Total Files

10

Last publish

Collaborators

  • carlos-menezes