Skip to main content

@microsoft/fast-foundation > DateFormatter > getYear

DateFormatter.getYear() method

Signature:
getYear(year?: number, format?: YearFormat, locale?: string): string;

Parameters

ParameterTypeDescription
yearnumberThe year to localize
formatYearFormatThe formatting for the year
localestringThe locale data used for formatting
Returns:

string

  • A localized string for the year