(
year: number,
month: number,
formatStr?: string
)
| 185 | } |
| 186 | |
| 187 | export function formatMonth( |
| 188 | year: number, |
| 189 | month: number, |
| 190 | formatStr?: string |
| 191 | ): string { |
| 192 | const {monthFormat} = extractFormats(formatStr); |
| 193 | const convertedFormat = convertFormatTokens(monthFormat); |
| 194 | return format(new Date(year, month, 1), convertedFormat, { |
| 195 | locale: getUserLocale(), |
| 196 | }); |
| 197 | } |
| 198 | |
| 199 | /** |
| 200 | * Extracts separate month and year format strings from a combined month_format, e.g. "MMM YY". |
no test coverage detected
searching dependent graphs…