Formats the date object based on the specified parameters. Returns String containing the formatted date.
Parameter | Type | Description |
---|---|---|
date | Date | Date object to be formatted |
options | String|Object |
String: Desired date format: short, medium, long, full, or default. If date is in the last week, it returns the localized day. If yesterday, today or tomorrow, it returns the localized strings for those days. Otherwise it returns the full date. Object: See below. |
options object properties:
Parameter | Type | Description |
---|---|---|
format | String | Desired date format: short, medium, long, full, or default. If date is in the last week, it returns the localized day. If yesterday, today or tomorrow, it returns the localized strings for those days. Otherwise it returns the full date. |
countryCode | String | Two letter IETF/ISO 639 code for a country/region. |
0 Comments