@myno_21/time
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

accessibility text

accessibility text

Build Status Codecov License

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

Package Sidebar

Install

npm i @myno_21/time

Weekly Downloads

3

Version

0.0.1

License

ISC

Unpacked Size

38.5 kB

Total Files

72

Last publish

Collaborators

  • myno_21