mirror of
https://github.com/orangecoding/fredy.git
synced 2026-06-16 12:31:07 +00:00
New Feature: Watch Listings (#215)
* adding new feature: watch listings for changes * adding todo for watch feature * sort by watch
This commit is contained in:
committed by
GitHub
parent
9f1e27d011
commit
a5efd9af32
@@ -1,11 +1,12 @@
|
||||
export function format(ts) {
|
||||
export function format(ts, showSeconds = true) {
|
||||
return new Intl.DateTimeFormat('default', {
|
||||
year: 'numeric',
|
||||
month: 'numeric',
|
||||
day: 'numeric',
|
||||
hour: 'numeric',
|
||||
minute: 'numeric',
|
||||
second: 'numeric',
|
||||
...(showSeconds ? { second: 'numeric' } : {}),
|
||||
}).format(ts);
|
||||
}
|
||||
|
||||
export const roundToHour = (ts) => Math.ceil(ts / (1000 * 60 * 60)) * (1000 * 60 * 60);
|
||||
|
||||
Reference in New Issue
Block a user