dayjs
dayjs copied to clipboard
feat: time based greeting
- 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.
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.
Codecov Report
Merging #1989 (d252b40) into dev (22cbeab) will decrease coverage by
3.04%. The diff coverage is66.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 dataPowered by Codecov. Last update 22cbeab...d252b40. Read the comment docs.
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?
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.
Ok, I created: https://www.npmjs.com/package/dayjs-greet I think we can close this PR