Describe the bug
When a Day.js instance is passed directly to Moment (moment(dayjsValue)), the resulting Moment date becomes the current date instead of the Day.js date for some inputs.
In my case, this caused a CSV export range bug: selecting 2026-03-01 to 2026-03-19 ended up sending from as 2026-03-19 (today), so only today's records were exported.
Expected behavior
moment(dayjs('2026-03-01')) should represent 2026-03-01, not the current date.
Actual behavior
moment(dayjs('2026-03-01')).format() returns 2026-03-19... (current day in my environment).
Minimal reproduction
const moment = require('moment')
const dayjs = require('dayjs')
const d = dayjs('2026-03-01')
console.log('dayjs:', d.format()) // 2026-03-01T00:00:00+09:00
console.log('moment(dayjs):', moment(d).format()) // 2026-03-19T00:00:00+09:00 (unexpected)
console.log('moment(dayjs.toDate()):', moment(d.toDate()).format()) // 2026-03-01T00:00:00+09:00 (expected)
Day.js Version: 1.11.19
OS: Linux
Browser: N/A (Node.js reproduction)
Node.js: v24.0.0
Moment Version: 2.30.1
Time zone: Asia/Tokyo (GMT+09:00)
Describe the bug
When a Day.js instance is passed directly to Moment (
moment(dayjsValue)), the resulting Moment date becomes the current date instead of the Day.js date for some inputs.In my case, this caused a CSV export range bug: selecting
2026-03-01to2026-03-19ended up sendingfromas2026-03-19(today), so only today's records were exported.Expected behavior
moment(dayjs('2026-03-01'))should represent2026-03-01, not the current date.Actual behavior
moment(dayjs('2026-03-01')).format()returns2026-03-19...(current day in my environment).Minimal reproduction
Day.js Version: 1.11.19
OS: Linux
Browser: N/A (Node.js reproduction)
Node.js: v24.0.0
Moment Version: 2.30.1
Time zone: Asia/Tokyo (GMT+09:00)