At this link of the Dayjs library you will read this:
const date1 = dayjs('2019-01-25')
const date2 = dayjs('2018-06-05')
date1.diff(date2) // 20214000000 default milliseconds
But if you type in the console, you'll get this:
new Date(2019,0,25) - new Date(2018,5,5)
// result: 20221200000
Why the difference?
const dayjs = require("dayjs")
const date1 = dayjs("2019-01-25")
const date2 = dayjs("2018-06-05")
console.log(date1.diff(date2)) // 20214000000
console.log(new Date(2019, 0, 25) - new Date(2018, 5, 5)) // 20214000000
console.log(new Date(2019, 0, 25).getTime() - new Date(2018, 5, 5).getTime()) // 20214000000
You can get the timestamp of Date with the .getTime() function, and in this case you are just doing 1548381600000 - 1528167600000. I'm not sure how did you get 20221200000 but this value is just wrong.