{"version":3,"file":"getMonthNames.mjs","sources":["../../../../src/common/dateUtils/getMonthNames/getMonthNames.ts"],"sourcesContent":["import { formatDate } from '@transferwise/formatting';\n\nexport const getMonthNames = (\n  locale: string,\n  format: Intl.DateTimeFormatOptions['month'] = 'long',\n): string[] => {\n  const months: string[] = [];\n  const date = new Date(2018, 0, 1);\n  const monthFormat = { month: format };\n  while (months.length < 12) {\n    months.push(formatDate(date, locale, monthFormat));\n    date.setMonth(date.getMonth() + 1);\n  }\n  return months;\n};\n"],"names":["getMonthNames","locale","format","months","date","Date","monthFormat","month","length","push","formatDate","setMonth","getMonth"],"mappings":";;AAEO,MAAMA,aAAa,GAAGA,CAC3BC,MAAc,EACdC,MAAA,GAA8C,MAAM,KACxC;EACZ,MAAMC,MAAM,GAAa,EAAE;EAC3B,MAAMC,IAAI,GAAG,IAAIC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;AACjC,EAAA,MAAMC,WAAW,GAAG;AAAEC,IAAAA,KAAK,EAAEL;GAAQ;AACrC,EAAA,OAAOC,MAAM,CAACK,MAAM,GAAG,EAAE,EAAE;IACzBL,MAAM,CAACM,IAAI,CAACC,UAAU,CAACN,IAAI,EAAEH,MAAM,EAAEK,WAAW,CAAC,CAAC;IAClDF,IAAI,CAACO,QAAQ,CAACP,IAAI,CAACQ,QAAQ,EAAE,GAAG,CAAC,CAAC;AACpC,EAAA;AACA,EAAA,OAAOT,MAAM;AACf;;;;"}