astrogators-shared-ui 0.17.4 → 0.17.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -1
- package/dist/src/utils/formatTime.d.ts +9 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1229,7 +1229,8 @@ function Be(e, t) {
|
|
|
1229
1229
|
return i < 24 ? `${i}h ago` : `${Math.floor(i / 24)}d ago`;
|
|
1230
1230
|
}
|
|
1231
1231
|
function Ve(e) {
|
|
1232
|
-
|
|
1232
|
+
let t = Math.floor(e / 3600), n = Math.floor(e % 3600 / 60), r = (e % 60).toString().padStart(2, "0");
|
|
1233
|
+
return t > 0 ? `${t.toString().padStart(2, "0")}:${n.toString().padStart(2, "0")}:${r}` : `${n}:${r}`;
|
|
1233
1234
|
}
|
|
1234
1235
|
var He = {
|
|
1235
1236
|
rosterRefresh: "_rosterRefresh_1rbul_3",
|
|
@@ -16,5 +16,13 @@ export declare function parseBackendTimestamp(iso: string): Date;
|
|
|
16
16
|
* display clock re-renders deterministically.
|
|
17
17
|
*/
|
|
18
18
|
export declare function formatRelativeTime(date: Date, nowMs: number): string;
|
|
19
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Countdown label, adaptive by magnitude: `m:ss` under an hour (e.g.
|
|
21
|
+
* `formatCountdown(125)` → `"2:05"`, matching a short cooldown like the
|
|
22
|
+
* roster-sync floor), `HH:MM:SS` at an hour or more (e.g.
|
|
23
|
+
* `formatCountdown(86399)` → `"23:59:59"`, for a day-long TTL like the
|
|
24
|
+
* guild report's) - the hours digits simply aren't there once the
|
|
25
|
+
* remaining time drops under an hour, rather than a `m:ss` display
|
|
26
|
+
* overflowing into unreadable four-digit minutes (`"1439:59"`).
|
|
27
|
+
*/
|
|
20
28
|
export declare function formatCountdown(sec: number): string;
|