Bernhard P.
Bernhard P.
Made a little test to run your code with the following configuration: Dayjs master (v1.11.3) node v16.15.0 Time zone GMT+02:00 The following test ran without problems: ``` import MockDate from...
OK, I got it: object support expects an object as first parameter that follows the structure described in the documentation. But this collides with the constructor of dayjs that gets...
To use the newly set default timezone you have to parse the value with `const datenow = dayjs.tz();` (or giving a date string as a parameter to .tz). See also...
Perhaps we should add a list of the allowed separator characters (`.-_:/()` and any whitespace) to the customParseFormat plugin documentation ('https://day.js.org/docs/en/parse/string-format')? PR #1913 would add a comma to that list.
And when we are at it, perhaps we should also add a list of the deviations from `moment` to the documentation: | title | parameters | dayjs | moment |...
Fixes issue #1331 too. Fixes issue #1552 too. Fixes issue #1616 too. Fixes issue #1750 too. Fixes issue #1902 too.
I finally found the "older" pr #1467 that solves at least the issue with the offset in strict mode, when the format contains a `Z` token. * the pr #1467...
You've got all the time in the world; if my documentation of the changes needs improvement, feel free to ask.
@iamkun I suppose this is a question to you 😄
As you don't define a time zone when parsing a date with `dayjs.tz(timestring, timezone)`, dayjs uses the time zone of the machine the program is running on. So to understand...