New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dateism

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dateism

Yesterday today and tomorrow

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

dateism npm version npm Build Status

For lack of a better name...

Premise

You are in a situation where you need to get lots of dates relative to a point in time and in the same format.

Usage

npm install dateism or yarn install dateism

dateism must be initialised with a format to use and optionally a seed date. If you don't supply a seed date then the date right now will be used.

Example

const dateism = require('dateism')
const dates = dateism({format: 'DD MMM YYYY', seed: new Date('1947-02-15')})

dates.addDays(-5)      // -> '10 Feb 1947'
dates.threeDaysAgo()   // -> '12 Feb 1947' 
dates.twoDaysAgo()     // -> '13 Feb 1947'

dates.today()          // -> '15 Feb 1947'

dates.tomorrow()       // -> '16 Feb 1947'
dates.addDays(5)       // -> '20 Feb 1947'

We're Hiring!

Featurist provides full stack, feature driven development teams. Want to join us? Check out our career opportunities.

Keywords

FAQs

Package last updated on 26 Jun 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc