Test case details

Preparation Code

const format = { weekday: 'long', month: 'long', day: '2-digit', }; const now = new Date(); const sharedDateTimeFormat = new Intl.DateTimeFormat('en-US', format); const sharedDateTimeZeroFormat = new Intl.DateTimeFormat('en-US');

Test cases

Test #1

const dateTimeFormat = new Intl.DateTimeFormat('en-US', format); dateTimeFormat.format(now);

Test #2

now.toLocaleTimeString('en-US', format)

Test #3

sharedDateTimeFormat.format(now);

Test #4

now.toLocaleTimeString('en-US')

Test #5

sharedDateTimeZeroFormat.format(now)