Andrey Bykiev

Results 271 comments of Andrey Bykiev

Hi, what is your timezone? I can't reproduce the issue with Europe/Moscow timezone UPD: reproduced with this [demo](https://codesandbox.io/s/dayjs-playground-forked-ue4ey1?file=/src/index.js:0-306) Here is a [demo ](https://codesandbox.io/s/moment-js-playground-forked-zdxpq1?file=/src/index.js) with moment.js and same results.

Indeed, depends on localtion, but I'm getting the same result for both libs, again small [demo](https://codesandbox.io/s/dayjs-playground-forked-pxzxul?file=/src/index.js) and my results: ``` 2022-12-31 00:00:00 +00:00 === 2022-12-31 00:00:00 +00:00 2011-12-31 00:00:00 +00:00...

Seems to be a bug with `utc` function. With `utcOffset` the result is correct: `dayjs(`12/31/${i}`).utcOffset(0,true).format("YYYY-MM-DD HH:mm:ss:SSS Z")`

> 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...

> > 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,...

> 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...

I did some more research and it seems the issue is not related to dayjs, here is small [demo](https://codesandbox.io/s/dayjs-playground-forked-5b0xnf?file=/src/index.js) with date: Ouput: ``` Sat Dec 31 2022 03:00:00 GMT+0300 (Москва,...

Hi, you can use [strict validation](https://day.js.org/docs/en/parse/is-valid) to validate the date. Here is a [demo](https://codesandbox.io/s/dayjs-playground-forked-hh9vyr?file=/src/index.js) Upd: I see you've created an issue in `angular-datetime-picker` repo. It seems to be not supported...

Hi, it's not a bug, according to the [docs](https://day.js.org/docs/en/display/from-now#list-of-breakdown-range) 46 days to 10 months | MM | 2 months ago ... 10 months ago -- | -- | -- 11...

Unfortunately, right now localized timezone names are not supported. But if you wish to display dt as `2022-07-21 00:00:00 KST` you could use this code `dayjs().tz("Asia/Seoul").format("YYYY-DD-MM HH:mm:ss [KST]");` small [demo](https://codesandbox.io/s/dayjs-playground-forked-mgm821?file=/src/index.js:234-301)