With code below the format of the output toLocalString has a Unicode Character white space between the time and meridian which is not consistent with the white space between the date and time.
The output of toLocaleString depends on the underlying platform as it uses Intl.DateTimeFormat.
The output is not guaranteed to be the same or consistent.
With code below the format of the output toLocalString has a Unicode Character white space between the time and meridian which is not consistent with the white space between the date and time.
`
`
Using these dates: const dateToFormat = '2023-05-22T12:00:00Z'; const expectedDate = '5/22/2023, 12:00 PM'; const actualDate = '5/22/2023, 12:00 PM';
This breaks tests using Jasmine.
I've only tested with 'DATETIME_SHORT' formatter and no others.