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

Function getTodayTz

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

Source from the content-addressed store, hash-verified

308};
309
310export const getTodayTz = (timeZone: string, now = new Date()): Date => {
311 const timeZonedToday = now.toLocaleString('en', { timeZone });
312 return new Date(timeZonedToday);
313};
314
315interface FormatDateProps {
316 value: Date | number | string;

Callers 2

dateFormat.spec.tsFile · 0.90
isOlderThanFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected