dayjs icon indicating copy to clipboard operation
dayjs copied to clipboard

feat: time based greeting

Open Dev-Rise opened this issue 3 years ago • 5 comments

  • Time-based greeting

** I didn't add it for all available languages if it is necessary I will do it. ** I create this PR just to be sure changes are made correctly, before I spend time filling greeting rules in all languages.

Dev-Rise avatar Jul 15 '22 06:07 Dev-Rise

Thanks for this lovely PR.

It is handy in some cases.

Maybe, it's better to ship this greet API as a separate plugin, not via dayjs core lib.

iamkun avatar Jul 19 '22 15:07 iamkun

Codecov Report

Merging #1989 (d252b40) into dev (22cbeab) will decrease coverage by 3.04%. The diff coverage is 66.50%.

@@             Coverage Diff             @@
##               dev    #1989      +/-   ##
===========================================
- Coverage   100.00%   96.95%   -3.05%     
===========================================
  Files          181      182       +1     
  Lines         2064     2264     +200     
  Branches       538      592      +54     
===========================================
+ Hits          2064     2195     +131     
- Misses           0       51      +51     
- Partials         0       18      +18     
Impacted Files Coverage Δ
src/locale/de-at.js 56.25% <0.00%> (-43.75%) :arrow_down:
src/locale/de-ch.js 56.25% <0.00%> (-43.75%) :arrow_down:
src/locale/es-do.js 30.00% <0.00%> (-70.00%) :arrow_down:
src/locale/es-mx.js 30.00% <0.00%> (-70.00%) :arrow_down:
src/locale/es-us.js 30.00% <0.00%> (-70.00%) :arrow_down:
src/locale/fr-ca.js 37.50% <0.00%> (-62.50%) :arrow_down:
src/locale/fr-ch.js 37.50% <0.00%> (-62.50%) :arrow_down:
src/locale/it-ch.js 37.50% <0.00%> (-62.50%) :arrow_down:
src/locale/nn.js 30.00% <0.00%> (-70.00%) :arrow_down:
src/locale/sv-fi.js 54.54% <0.00%> (-45.46%) :arrow_down:
... and 20 more

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 22cbeab...d252b40. Read the comment docs.

codecov[bot] avatar Jul 19 '22 15:07 codecov[bot]

Thanks for this lovely PR.

It is handy in some cases.

Maybe, it's better to ship this greet API as a separate plugin, not via dayjs core lib.

So should I publish it by myself as a separate plugin "dayjs-greet"? If I understand correctly it should be done like for example https://www.npmjs.com/package/dayjs-parser Am I right?

Dev-Rise avatar Jul 20 '22 09:07 Dev-Rise

Thanks for this lovely PR. It is handy in some cases. Maybe, it's better to ship this greet API as a separate plugin, not via dayjs core lib.

So should I publish it by myself as a separate plugin "dayjs-greet"? If I understand correctly it should be done like for example https://www.npmjs.com/package/dayjs-parser Am I right?

IMO, this is the right way to publish dayjs plugins.

iamkun avatar Jul 25 '22 14:07 iamkun

Ok, I created: https://www.npmjs.com/package/dayjs-greet I think we can close this PR

Dev-Rise avatar Aug 18 '22 11:08 Dev-Rise