iamkun / iamkun/dayjs

feature request - defaultFormat and defaultFormatUtc

Open
#2,080 2 comments 4 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
48.7k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

Hi! I'm migrating some `moment-timezone` code to `dayjs`.

There's one thing I can't figure out how to set in `dayjs`:

```js
moment.defaultFormat = 'YYYY-MM-DDTHH:mm:ss.SSS[Z]';
moment.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss.SSS[Z]';
```

I couldn't find anything similar in GitHub issues or in the documentation.

Any help is appreciated!

Contributor guide

Open the contributing guide

Research direction

Start by locating how Day.js currently handles default date and UTC formatting, then compare that behavior with the requested Moment.js settings. Done means users can configure both default formats and receive the requested output consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.