dayjs对monthsShort方法的参数重载缺少了数字的支持
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 48.7k
- Forks
- 2.8k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
dayjs的dayjs.monthsShort 方法和moment的有一点区别。moment支持从一个数字返回月份,这块逻辑能补上吗
比如moment.monthsShort(1) === '2月',dayjs.monthsShort(1) === '1月2月3月......11月12月'
如下图是moment的api


Expected behavior
api缺失
Information
- Day.js Version [e.g. v1.0.0]
- OS: [e.g. iOS]
- Browser [e.g. chrome 62]
- Time zone: [e.g. GMT-07:00 DST (Pacific Daylight Time)]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the dayjs.monthsShort API and compare its current argument handling with Moment's numeric behavior. Verify the expected result for a numeric month argument and ensure the no-argument behavior remains intact; done means a numeric input returns the corresponding abbreviated month instead of the full month list.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100