/custom-date-formatting

Npm package for custom date formatting

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

Custom Date Formatting

npm version Dependencies npm Downloads

How to install?

NPM

Small package which provides some basic functions for custom date formatting

getNextOrPrevDateCustomFormat()

This function takes input <b>format</b> of date required and <b>numberOfDays</b> to add from current day<br>
For previous days numberOfDays should be passed as negative value<br>

getNextOrPrevMinuteDateCustomFormat()

This function takes input <b>format</b> of date required and <b>minutesToAdd</b> to add/subtract minutes from current time<br>
For passed minute of time, minutesToAdd should be passed as negative value<br>

getNextOrPrevSecondDateCustomFormat()

This function takes input format of date required and secondsToAdd to add/subtract seconds from current time
For passed minute of time, secondsToAdd should be passed as negative value

customSourceDateFormatToCustomNewDateFormat()

This function takes input <b>date</b> (input date), <b>currentFormat</b> (input date format), <b>newformat</b> (required date format)<br>

getTimeStampFromCurrentDateFormat()

This function takes input <b>date</b> (input date), <b>currentFormat</b> (input date format)<br>
It will return input date value as timestamp in milliseconds<br>

NOTE

Please drop in any suggestions to arshadkazmi42@gmail.com