getDatePickerDate
A utility method to get a date-picker date string in the format 2024-04-03
from a Date object, timestamp in ms,
or a valid date/time string. By default, the date string will reflect the client's local date for the provided date.
An optional IANA timeZone string can be provided to adjust the resulting date string to reflect the local date
in the provided timeZone at that point in time.
getDatePickerDate('2024-03-29T16:00:00.000Z', 'America/New_York')
// => 2024-03-29
(eastern)
getDatePickerDate('2024-03-29T16:00:00.000Z', 'America/Los_Angeles')
// => 2024-03-29
(pacific)
Parameters
Returns
a date-picker date string, e.g. 2024-03-29
string
Function defined in common/src/utils/date/getDatePickerDate.ts:19