mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 23:33:13 +09:00
Add time unit suffixes to variables (#561)
Add suffixes like Ms and Ns to variables whos time unit is not in seconds. This is aligning with a new code style of putting units on variables that are not in SI base units.
This commit is contained in:
1 parent
9842705eb9
commit
c53781d16c
38 files changed
+221
-201
No files matched your search
@@ -31,7 +31,7 @@ export function formatDuration(ms: number): string {
|
||||
return result;
|
||||
}
|
||||
|
||||
export function formatTimestamp(timestamp: number): string {
|
||||
export function formatTimestamp(timestampMs: number): string {
|
||||
const options = {
|
||||
year: "numeric",
|
||||
month: "numeric",
|
||||
@@ -39,5 +39,5 @@ export function formatTimestamp(timestamp: number): string {
|
||||
hour: "numeric",
|
||||
minute: "numeric",
|
||||
} as const;
|
||||
return new Intl.DateTimeFormat(undefined, options).format(new Date(timestamp));
|
||||
return new Intl.DateTimeFormat(undefined, options).format(new Date(timestampMs));
|
||||
}
|
||||
Reference in new issue
Block a user