MCPcopy Create free account
hub / github.com/dailydotdev/apps / getTodayTz

Function getTodayTz

packages/shared/src/lib/dateFormat.ts:284–287  ·  view source on GitHub ↗
(timeZone: string, now = new Date())

Source from the content-addressed store, hash-verified

282};
283
284export const getTodayTz = (timeZone: string, now = new Date()): Date => {
285 const timeZonedToday = now.toLocaleString('en', { timeZone });
286 return new Date(timeZonedToday);
287};
288
289interface FormatDateProps {
290 value: Date | number | string;

Callers 2

dateFormat.spec.tsFile · 0.90
isOlderThanFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected