1.0.1 • Published 7 years ago

date-path v1.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

Date Path

Give him a date, it will return a path.

Installation

npm install date-path

Can be used on browser directly, with dist/date-path.min.js.

Usage

const datePath = require('date-path');

console.log(datePath(new Date(2017, 1, 12)));
// > 2017/02/

console.log(datePath(new Date(2016, 11, 20)));
// > 2016/12/

// By default it is today's date (and today is March 22th of 2017)
console.log(datePath());
// > 2017/03/
1.0.1

7 years ago

1.0.0

7 years ago