Download client/src/shared/cross/buildTimeDisplay.ts from dqy08/InfoLens: direct link, hf CLI and curl.
- Browser
- Download file 594 Bytes
-
https://huggingface.co/spaces/dqy08/InfoLens/resolve/main/client/src/shared/cross/buildTimeDisplay.ts
- Command line
-
hf download hf://spaces/dqy08/InfoLens/client/src/shared/cross/buildTimeDisplay.ts
-
curl -L -o buildTimeDisplay.ts https://huggingface.co/spaces/dqy08/InfoLens/resolve/main/client/src/shared/cross/buildTimeDisplay.ts
594 Bytes
| import { FRONTEND_BUILD_TIME } from '../buildInfo'; | |
| const VALUE_ID = 'frontend_build_time'; | |
| function formatBuildTime(iso: string): string { | |
| const d = new Date(iso); | |
| if (Number.isNaN(d.getTime())) return iso; | |
| return d.toLocaleString('en-US', { | |
| year: 'numeric', | |
| month: '2-digit', | |
| day: '2-digit', | |
| hour: '2-digit', | |
| minute: '2-digit', | |
| }); | |
| } | |
| export function initFrontendBuildTimeDisplay(): void { | |
| const el = document.getElementById(VALUE_ID); | |
| if (!el) return; | |
| el.textContent = `Build: ${formatBuildTime(FRONTEND_BUILD_TIME)}`; | |
| } | |