dayjs
dayjs copied to clipboard
⏰ Day.js 2kB immutable date-time library alternative to Moment.js with the same modern API
**Describe the bug** When manipulating a date with unit type `day` and an arbitrary decimal number does not manipulate the time of the date. **Expected behavior** The time is manipulated...
**Describe the bug** ```html dayjs.extend(window.dayjs_plugin_advancedFormat) dayjs.extend(window.dayjs_plugin_customParseFormat) dayjs.extend(window.dayjs_plugin_weekOfYear) dayjs.extend(window.dayjs_plugin_weekYear) var date = dayjs("2022-31", "YYYY-ww").toDate() console.log(date); // Sat Jan 01 2022 00:00:00 GMT+0800 (中国标准时间) console.log(dayjs(date).format('YYYY-ww')); // 2022-01 ``` **Expected behavior** ```js console.log(dayjs(date).format('YYYY-ww'));...
In french, when writing dates, there is no ordinal for numbers over 1. - lundi 1er août 2022 :heavy_check_mark: - jeudi 11 août 2022 :heavy_check_mark: - jeudi 11e août 2022...
Node.js has implemented native support for ESM in the real world, and the community is increasingly recommending the use of ESM instead of CommonJS (e.g: https://blog.sindresorhus.com/get-ready-for-esm-aa53530b3f77). I noticed that `dayjs`...
v2 branch is here https://github.com/iamkun/dayjs/tree/next If you have issues about v2, please comment on this issue. Please **do not comment** on irrelevant content. ## Changelog ### `2.0.0-alpha.0` ⚠️ At this...
**Describe the bug** ``` moment.tz("2022-06-13T13:47:25Z", "America/New_York").format('YYYY-MM-DD HH:mm') -> 2022-06-13 09:47 dayjs.tz("2022-06-13T13:47:25Z", "America/New_York").format('YYYY-MM-DD HH:mm') -> 2022-06-13 13:47 dayjs.tz("2022-06-13T13:47:25Z", "Asia/Tokyo").format('YYYY-MM-DD HH:mm') -> 2022-06-13 13:47 ``` **Expected behavior** dayjs.tz look like do nothing...
In dutch locale, the ordinal doesn't show properly, some letters get interpreted. Before the fix: :x: ```javascript dayjs().locale('nl').format('Do'); // 44e dayjs('2022-08-23').locale('nl').format('Do'); // 230te ``` After the fix: :heavy_check_mark: ```javascript dayjs().locale('nl').format('Do');...
**Describe the bug** Start of month is incorrect and showing the last day in previous month. ```javascript const from = dayjs.tz(dayjs(),'Europe/London').startOf('month') const end = dayjs.tz(dayjs(),'Europe/London').endOf('month') ``` The above when console...
**Describe the bug** Dayjs breaks react native when I call the format method e.g: ```ts import dayjs from "dayjs"; dayjs().format("ddd MMM D, YYYY") ``` I get this error: ```shell undefined...