m-date-time
v2.0.9
Published
the library will help convert date time into various format
Downloads
3
Maintainers
Readme
date-time-helper
Usage
Node environment
Install
npm install js-date-time-helper
Usage
import { DateTimeHelper } from "m-date-time-helper";
console.log(DateTimeHelper.getTodayYearMonthData());
Browser environment
Add this script in the body of html.
<script src="https://www.unpkg.com/m-date-time/out/date-time-helper.js"></script>
Use this way in js files.
DateTimeHelper.getMonthDateYearBeutify()
DateTimeHelper.getTodayYearMonthData()
Available methods
getTodayYearMonthData
Format: 2021-09-27
getThisWeekRange
Format [ 'Sep 26, 2021', 'Oct 02, 2021' ]
getMonthDateYearBeutify
Input: Date
Output: Sep 27, 2021
getMonthFromNumber
Input: 1
Output: Jan
getBrowserTimeZoneOffset
Output: "+06:00:00"
getHourMinuteSecondFromSeconds
Input: 3670
Output: "01:01:10"
Input: 259635
Output: "72:07:15"
getHourMinuteFromMin
Input: 259635
Output: "4327 Hours 15 Mins"
Input: 1256
Output: "20 Hours 56 Mins"