0.0.5 • Published 3 years ago

time-passed v0.0.5

Weekly downloads
24
License
MIT
Repository
github
Last release
3 years ago

Time Passed

A library that helps you with showing the time passed since some other timestamp.

Helpful for posts and updates and such.

NOTE: uses millisecond Unix time

Demo

https://timepassed.robbie.digital/

Usage

Import

import Time from "time-passed";
Time.getRelativeTime(Date.now(), 1605236401152);

or in ES5

const Time = require("time-passed").default;
Time.getRelativeTime(Date.now(), 1605236401152);

or in UMD

<script src="https://unpkg.com/time-passed@0.0.3/umd/index.js"></script>
<script>

  const newTime = window.TimePassed.default.getRelativeTime(Date.now(), 1605236401152);
</script>