tyhme

1.1.3 • Public • Published

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.

Package Sidebar

Install

npm i tyhme

Weekly Downloads

1

Version

1.1.3

License

MIT

Unpacked Size

11.4 kB

Total Files

17

Last publish

Collaborators

  • cookie-does-web-dev