mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 18:18:55 +00:00
replace moment with Intl.DateTimeFormat (#597)
This commit is contained in:
@@ -1,9 +1,20 @@
|
||||
import moment from "moment"
|
||||
import zxcvbn from "zxcvbn"
|
||||
|
||||
const dateFormatter = new Intl.DateTimeFormat(
|
||||
'en-US',
|
||||
{
|
||||
weekday: 'short',
|
||||
month: 'short',
|
||||
day: 'numeric',
|
||||
year: 'numeric',
|
||||
hour: 'numeric',
|
||||
minute: 'numeric'
|
||||
}
|
||||
)
|
||||
|
||||
const FormatTimestamp = function (timestamp) {
|
||||
if (timestamp) {
|
||||
return moment(timestamp).format("llll z")
|
||||
return dateFormatter.format(new Date(timestamp))
|
||||
} else {
|
||||
return "Never"
|
||||
}
|
||||
|
||||
1433
apps/fz_http/assets/package-lock.json
generated
1433
apps/fz_http/assets/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -18,7 +18,6 @@
|
||||
"buffer-from": "^1.1.1",
|
||||
"glob": "^7.1.7",
|
||||
"highlight.js": "^11.4.0",
|
||||
"moment": "^2.29.1",
|
||||
"phoenix": "file:../../../deps/phoenix",
|
||||
"phoenix_html": "file:../../../deps/phoenix_html",
|
||||
"phoenix_live_view": "file:../../../deps/phoenix_live_view",
|
||||
|
||||
Reference in New Issue
Block a user