Skip to main content
Version: 1.x

@microsoft/fast-foundation > DateFormatter > getDateObject

DateFormatter.getDateObject() method

Helper function to make sure that the DateFormatter is working with an instance of Date

Signature:
getDateObject(date: {
day: number;
month: number;
year: number;
} | string | Date): Date;

Parameters

ParameterTypeDescription
date{ day: number; month: number; year: number; } | string | DateThe date as an object, string or Date insance
Returns:

Date

  • A Date instance