iamkun / iamkun/dayjs

Support the microsecond formatting

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

Description

**Describe the bug**
Currently, day.js is able to parse microseconds, which https://github.com/iamkun/dayjs/pull/1010 adds.
Can it also support microsecond formatting?

**Expected behavior**
A clear and concise description of what you expected to happen.

```
const d = dayjs('2019-03-25T06:41:00.999888');
d.format('YYYY-MM-DD HH:mm:ss SSSSSS')

// "2019-03-25 06:41:00 999888"
```

Contributor guide

Open the contributing guide

Research direction

Start from the format() entry point and compare the microsecond parsing change referenced in pull request #1010. Use the provided timestamp and expected "SSSSSS" output as the acceptance check; done means microsecond formatting preserves and emits all six fractional digits.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
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.