iamkun / iamkun/dayjs

duration({})插件不能将时间单位进行转换,只能无脑生成相应格式的时间字符串。

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

Description

这种写法并不能够将时间进行转换。
![image](https://user-images.githubusercontent.com/80879723/147402249-ad931fcf-04c8-4b22-b8b1-c80a7cb31bdc.png)
下图为正确解决方法。![Uploading image.png…]()![image](https://user-images.githubusercontent.com/80879723/147402173-cec8442b-838f-43a8-b9fb-564b19d86c8c.png)

Contributor guide

Open the contributing guide

Research direction

Start from the duration({}) plugin entry point and reproduce the behavior described in the issue, using the linked screenshots as the expected-versus-current reference. Identify the plugin's existing tests, then add coverage showing that duration converts between time units rather than only producing a formatted string; done means the test passes with the expected converted value.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.