MCPcopy Create free account
hub / github.com/node-modules/utility / datestruct

Function datestruct

src/date.ts:161–167  ·  view source on GitHub ↗
(now?: Date)

Source from the content-addressed store, hash-verified

159 * - {Number} H, 0, 1, 9, 12, 23
160 */
161export function datestruct(now?: Date): DateStruct {
162 now = now || new Date();
163 return {
164 YYYYMMDD: now.getFullYear() * 10000 + (now.getMonth() + 1) * 100 + now.getDate(),
165 H: now.getHours(),
166 } satisfies DateStruct;
167}
168
169/**
170 * Get Unix's timestamp in seconds.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…