Category : date

In JavaScript would it be possible to create a date using a format string? Example: new Date(’10/12/2020′, ‘dd/mm/yyyy’); new Date(’12/10/2020′, ‘mm/dd/yyyy’); new Date(‘2020/01/20’, ‘yyyy/mm/dd’); new Date(‘2020-01-20’, ‘yyyy-mm-dd’); new Date(‘2020 01 20’, ‘yyyy mm dd’); All of those would create a new valid date. Source: Ask Javascript..

Read more