@myno_21/time
v0.0.1
Published
Beginner friendly to use & the simplest way of formatting dates, making timestamps and many more
Downloads
10
Maintainers
Keywords
Readme
Time
Simplest way of formatting dates, making timestamps and many more!
Short message
This package has been re-published the old one was deleted, and sadly now the package doesn't contain the "getTimezone" function due to some reasons. Other than that, the package is still the completely updated. Old deprecated methods are removed.
Features 📣
- Converts localized time to Unix-Epoch timestamps.
- Converts a Unix-Epoch timestamp to a human readable time.
- Get the time in a localized format -> "in xyz seconds"/"xyz seconds ago"
- Get a formatted time.
- Get the current in a formatted manner with some cool options.
- Sets a timer for your. With the timer events.
- Converts seconds to a proper formatted duration.
❔Installation
$ npm install @myno_21/time
Import
// ES6
import * as Time from "@myno_21/time"; // Since the package doesn't provide you a default import. So you have to import everything.
// CJS
const Time = require("@myno_21/time");
Usage
const result = getUnix("4 days");
console.log(result); // --> 1681400820
🔗 Links
License
ISC