Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(moment-to-dayjs): replace date-time lib Moment.js with Day.js #34057

Merged
merged 28 commits into from
May 6, 2022

Conversation

iamkun
Copy link
Contributor

@iamkun iamkun commented Feb 15, 2022

[中文版模板 / Chinese template]

🤔 This is a ...

  • Refactoring

🔗 Related issue link

💡 Background and solution

ref:
#34087
#33862

⚠️ Note

Updated 23 snapshots that have different locales between moment.js and day.js, mainly because of the translation and first day of week setting. (check this commit 03cceee)

If you think the locale is incorrect in day.js, feel free to raise an issue here https://github.com/iamkun/dayjs/pulls

📝 Changelog

Language Changelog
🇺🇸 English replace date-time lib Moment.js with Day.js
🇨🇳 Chinese 将时间日期库 Moment.js 替换成 Day.js

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@github-actions
Copy link
Contributor

github-actions bot commented Feb 15, 2022

@github-actions
Copy link
Contributor

github-actions bot commented Feb 15, 2022

Size Change: +5.7 kB (+1%)

Total Size: 896 kB

Filename Size Change
./dist/antd-with-locales.min.js 451 kB +2.87 kB (+1%)
./dist/antd.min.js 398 kB +2.83 kB (+1%)
ℹ️ View Unchanged
Filename Size
./dist/antd.compact.min.css 11.4 kB
./dist/antd.dark.min.css 12 kB
./dist/antd.min.css 11.4 kB
./dist/antd.variable.min.css 11.8 kB

compressed-size-action

@xrkffgg xrkffgg mentioned this pull request Feb 21, 2022
@iamkun iamkun marked this pull request as ready for review March 30, 2022 08:02
@yoyo837
Copy link
Contributor

yoyo837 commented May 6, 2022

是按不可变对象直接全部替换吗?

@afc163
Copy link
Member

afc163 commented May 6, 2022

https://ant.design/docs/react/i18n 这个文档也需要更新一下。

@codecov
Copy link

codecov bot commented May 6, 2022

Codecov Report

Merging #34057 (250665c) into next (7460c95) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 250665c differs from pull request most recent head fe435a4. Consider uploading reports for the commit fe435a4 to get more accurate results

@@            Coverage Diff            @@
##              next    #34057   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          459       459           
  Lines         8336      8336           
  Branches      2391      2391           
=========================================
  Hits          8336      8336           
Impacted Files Coverage Δ
components/time-picker/index.tsx 100.00% <ø> (ø)
components/calendar/index.tsx 100.00% <100.00%> (ø)
components/date-picker/index.tsx 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7460c95...fe435a4. Read the comment docs.

package.json Outdated
@@ -122,6 +122,7 @@
"@ctrl/tinycolor": "^3.4.0",
"classnames": "^2.2.6",
"copy-to-clipboard": "^3.2.0",
"dayjs": "^1.11.1",
"lodash": "^4.17.21",
"memoize-one": "^6.0.0",
"moment": "^2.29.2",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moment 是不是可以移动到 devDeps 里了?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@zombieJ zombieJ merged commit 69e1c33 into next May 6, 2022
@zombieJ zombieJ deleted the feat/momentjs-to-dayjs branch May 6, 2022 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants