tomorrow.js

1.8.0 • Public • Published

Tomorrow.js

Small javascript library, which helps you to menage dates in js.

Installation

const tomorrow = require("tomorrow.js")
const day = new tomorrow()

Basic methods

const today = day.today(); // for example: 2020 | 11 | 20
const today = day.today("string") // for example: 2020 | November | Friday
const today = day.today("string", "/") // for example: 2020/November/Friday

const year = day.year(); // for example: 2020
const month = day.month(); // for example: 11
const month = day.month("string") // for example: November

Other methods

const yesterday = day.yesterday(); // for example: 2020 | 11 | 19
const yesterday = day.yesterday("string") // for example: 2020 | November | Thursday
const yesterday = day.yesterday("string", "/") // for example: 2020/November/Thursday

In future...

const tomorrow = day.tomorrow();

Package Sidebar

Install

npm i tomorrow.js

Weekly Downloads

1

Version

1.8.0

License

ISC

Unpacked Size

4.47 kB

Total Files

5

Last publish

Collaborators

  • pjot3r