1.1.3 • Published 3 years ago

tyhme v1.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Tyhme

A time manipulation package.
  • Add and subtract days, hours, years, etc. to a date.
  • Format date to just about anything like MM/DD/YY, MM-DD-YYY, etc.
  • Get time from and time to a certain date, it could return "yesterday", "a year ago", "last year".

Installation

npm install --save tyhme

Quick Start

const Tyhme = require('tyhme');

const tyhme = new Tyhme();

Methods

Format

tyhme.format('MM/DD/YYYY'); // returns current date in that format. exp: 12/12/2021

Time Ago

tyhme.timeAgo(); // returns just now.

Add

tyhme.add(12, 'days'); // adds 12 days to current date.

Subtract

tyhme.subtract(10, 'days'); // subtracts 10 days to current date.
1.2.0

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago