iamkun / iamkun/dayjs

iso format time

Open
#2,441 0 comments 1 reaction 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**
error ISO_8601 does not exist in the typey of dayjs
Well as i understood that dayjs and moment have the same api, i just replaced it in code as
~~~TS
import * as moment from 'dayjs'; // the easiest way to upgrade my project.
const dataSample = [+moment(measurePoint.measureTime, moment.ISO_8601).format('x'), measurePoint.measureValue];
~~~
**Expected behavior**
The above line should work (as an api replacement).

**Information**
- Day.js: "dayjs": "^1.11.9",
- OS: Win 11
- Browser: chrome
- Time zone: iso time

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the TypeScript example with Day.js 1.11.9 and check the public parsing API and its type declarations. Compare the requested Moment-compatible ISO_8601 usage with existing parsing behavior and tests, if available. Done means the example type-checks and produces the expected formatted timestamp.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.