customParseFormat: added logic to parse the week day
Resolves issue #571
import customParseFormat from 'dayjs/plugin/customParseFormat'; dayjs.extend(customParseFormat);
var fmt = 'dddd DD MMMM HH:mm';
var d = dayjs('Tuesday 16 January 18:00', fmt); // works fine: d.isValid() is true
d = dayjs('Monday 15 January 18:00', fmt); // works fine: d.isValid() is true
d = dayjs('Saturday 20 January 18:00', fmt); // works fine: d.isValid() is true
test case failing with moment 2.24.0.
I have checked with moment 2.5.1. It's working. https://jsfiddle.net/pkje2y6z/
What would be the use of parsing the weekday?
Wouldn't it be better to parse variable length text (e.g. the name of a weekday) like in issue #571 ?