Socket
Book a DemoInstallSign in
Socket

to-date

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

to-date

Simple time ago/from now date generator

latest
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

NPM
version Build Status

to-date

Simple time ago/from now date generator.

Usage

var toDate = require('to-date');
toDate(1).day.ago;
toDate(1).day.fromNow;
toDate(1).day.from.now;

toDate(2).hours.ago;
toDate(2).hours.fromNow;
toDate(2).hours.from.now;

toDate(3).months.ago;
toDate(3).months.fromNow;
toDate(3).months.from.now;

toDate(4).years.ago;
toDate(4).years.fromNow;
toDate(4).years.from.now;

toDate('1 day from now');
toDate('2 months from now');
toDate('11 years from now');

toDate('1 day ago');
toDate('2 months ago');
toDate('11 years ago');

Units

  • second
  • seconds
  • minute
  • minutes
  • hour
  • hours
  • day
  • days
  • week
  • weeks
  • month
  • months
  • year
  • years

Installation

npm install to-date

License

MIT License

FAQs

Package last updated on 15 Feb 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts