MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / stripTimeZone

Function stripTimeZone

core/src/components/datetime/utils/format.ts:19–33  ·  view source on GitHub ↗
(formatOptions: Intl.DateTimeFormatOptions)

Source from the content-addressed store, hash-verified

17 * confusion.
18 */
19export const stripTimeZone = (formatOptions: Intl.DateTimeFormatOptions): Intl.DateTimeFormatOptions => {
20 return {
21 ...formatOptions,
22 /**
23 * Setting the time zone to UTC ensures that the value shown is always the
24 * same as what was selected and safeguards against older Safari bugs with
25 * Intl.DateTimeFormat.
26 */
27 timeZone: 'UTC',
28 /**
29 * We do not want to display the time zone name
30 */
31 timeZoneName: undefined,
32 };
33};
34
35export const getLocalizedTime = (
36 locale: string,

Callers 3

format.spec.tsFile · 0.90
getLocalizedTimeFunction · 0.85
getLocalizedDateTimeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected