0.1.1 • Published 7 years ago
date-utility v0.1.1
Date-Utility
A small library that has some date verification and utilities.
Installation
npm install date-utility
Usage
const dateUtil = require('date-utility');
const currentYear = dateUtil.getCurrentYear(); // 2017
const age = dateUtil.getYearsSince(1944); // 73
const formattedDate = dateUtil.getFormattedDate("01/01/2017") //"2017-01-01"
const validDate = dateUtil.isValidDate("01/01/2017") //true
Tests
npm test