timestamp-manager
v1.2.9
Published
This project uses the MS library, made by another developer credits to Vercel, this project aims to help in timestamp conversions and formatting such as milliseconds to seconds and so on.
Readme
Timestamp Manager
Library made for timestamp conversion and formatting (under development)
- Simple to use.
Installation
- Requires Node.js
> npm i timestamp-managerExamples
/*next_day: "sun" | "mon" | "tues" | "wednes" | "thurs" | "fri" | "satur"*/
DefineNextDay("sun", { hr: 21, inSeconds: true });
StringFormat('You are in the day DD/MM/YYYY hr:mn:ss');
StringFormat('you are in the day DD/MM/YYYY hr:mn:ss', {monthName: true, date: new Date(47865378525837)}) // day = DD, month = MM, year = YYYY, hour = hr, minutes = mn, seconds = ss
AddTimeToDate('1d'); //add 1 day in timestamp -> return in milliseconds
AddTimeToDate('1d', true); //add 1 day in timestamp -> return in seconds
MillisToSeconds(1660871309001); //return in seconds
SecondsToMillis(1660871597); //return in MillisecondsLicense
MIT
Free Library
