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

Function getMonthAndYear

core/src/components/datetime/utils/format.ts:173–176  ·  view source on GitHub ↗
(locale: string, refParts: DatetimeParts)

Source from the content-addressed store, hash-verified

171 * Example: May 2021
172 */
173export const getMonthAndYear = (locale: string, refParts: DatetimeParts) => {
174 const date = getNormalizedDate(refParts);
175 return new Intl.DateTimeFormat(locale, { month: 'long', year: 'numeric', timeZone: 'UTC' }).format(date);
176};
177
178/**
179 * Given a locale and a date object,

Callers 2

renderCalendarHeaderMethod · 0.90
format.spec.tsFile · 0.90

Calls 1

getNormalizedDateFunction · 0.85

Tested by

no test coverage detected