Bernhard P.
Bernhard P.
The problem is using 'MMM' in customParseFormat with locale 'en' as there is no definition for 'monthShort' in this locale and the documentation says `you don't need monthShort in locale...
In your code you use the **internal** variable `$d` of the dayjs object. Why do you do this? A better variant of your code sample could look like this: ```...
Oh no that is not the idea of internal variables 😄 dayjs(...) returns a dayjs object with many nice fields and functions. So if you want to get a string...
I suppose by > it doesn't work when the format is DD-MMM-YY you mean 'using `MMM` when parsing a string to a date'. To use `MMM` in parsing, you have...
Here my updated test code: ``` import customParseFormat from 'dayjs/plugin/customParseFormat.js'; import utc from 'dayjs/plugin/utc.js'; import timezone from 'dayjs/plugin/timezone.js'; dayjs.extend(customParseFormat); dayjs.extend(utc); dayjs.extend(timezone); const newDate = dayjs.tz('19-Feb-00', 'DD-MMM-YY', 'America/Bogota') console.log(newDate.format()) // -->...
I created a simple webpage to test the function: ``` dayjs issue #2007 body {font: 12px/14px sans-serif} .tg {border-collapse:collapse;border-spacing:0;} .tg td{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px; overflow:hidden;padding:10px 5px;word-break:normal;} .tg th{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px; font-weight:normal;overflow:hidden;padding:10px 5px;word-break:normal;} .tg...
I created a demo [CodeSandbox](https://codesandbox.io/s/optimistic-golick-6vqz7b?file=/src/App.js) and it runs without error - strange 😄
This is not a bug, but the correct implementation of time zones. So for example for CET the definition of the time zone ("UTC offset") changed several times over the...
> why does .utcOffset(0,true) has another results Using `utcOffset` with 1 parameter, sets the utcOffset of a given dayjs object. Using `utcOffset` with 2 parameters, sets the utcOffset of a...
in the meantime: how about using ``` dayjs.utc(`12/31/${i}`).format(f) ``` instead of ``` dayjs(`12/31/${i}`).utc(true).format(f) ``` In a quick test, this solves the point on my machine (I believe 😄 ). Nevertheless...