iamkun / iamkun/dayjs

do toISOString(true) in dayjs like in momentjs

Open
#1,979 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
48.7k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

We are currently in the process of migrating our legacy momentJS code over to dayJS and so far it is going well. However, we are running into issues when trying to replace 'toISOString()' function, since in momentJS we have an option of send 'True' parameter to prevent UTC conversion while in dayJS we don't have such an option.

Docs: https://momentjs.com/docs/#/displaying/as-iso-string/

in momentjs:
moment().toISOString(true) // '2022-07-06T22:23:50.881+03:00'

in dayjs:
dayjs().toISOString() // '2022-07-06T19:23:41.643Z'

In DayJS is there an equivalent function or how we can accomplish the same goal?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.