shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
timeAgo
Type:Function
Status:stable
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.datetime
Simple “time” ago for your Unix timestamps and JavaScript Date objects.
Params
- timestamp*-Number
The timestamp to transform
- format“‘medium’“‘short’|‘medium’|‘long’
The format you want back
Return
- -String
The converted value
Example
import { timeAgo } from '@blackbyte/sugar/datetime';
timeAgo(1611344957); // => 7 secs agoTodo
- testsnormal
Author
- Olivier Bosselolivier.bossel@gmail.comhttps://blackbyte.space