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

add meridiem function to ku locale #1725

Merged
merged 1 commit into from
Mar 1, 2022
Merged

add meridiem function to ku locale #1725

merged 1 commit into from
Mar 1, 2022

Conversation

akamfoad
Copy link
Contributor

@akamfoad akamfoad commented Dec 1, 2021

Kurdish ku locale has it's own form of meridiem texts which are:
AM -> پ.ن
PM -> د.ن
The logic of determining which should be chosen is identical
to the main logic from the library, the only change is localized
strings for each case.
Also tests are added to the corresponding locale to ensure it
gets formatted correctly.

Closes #1724

Kurdish (ku) locale has it's own form of meridiem texts which are:
`AM` -> `پ.ن`
`PM` -> `د.ن`
The logic of determining which should be chosen is identical
to the main logic from the library, the only change is localized
strings for each case.
Also tests are added to the corresponding locale to ensure it
gets formatted correctly.
@codecov
Copy link

codecov bot commented Dec 13, 2021

Codecov Report

Merging #1725 (f7dff46) into dev (5a108ff) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##               dev     #1725   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          179       179           
  Lines         1996      1997    +1     
  Branches       507       508    +1     
=========================================
+ Hits          1996      1997    +1     
Impacted Files Coverage Δ
src/locale/ku.js 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 5a108ff...f7dff46. Read the comment docs.

@@ -18,6 +18,7 @@ const locale = {
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd, D MMMM YYYY HH:mm'
},
meridiem: hour => (hour < 12 ? 'پ.ن' : 'د.ن'),
Copy link
Owner

Choose a reason for hiding this comment

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

Hi, should we keep the same with momentjs as https://github.com/moment/moment/blob/e96809208c9d1b1bbe22d605e76985770024de42/locale/ku.js#L76

meridiem: function (hour, minute, isLower) {
            if (hour < 12) {
                return 'به‌یانی';
            } else {
                return 'ئێواره‌';
            }
        },

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @iamkun

Not sure if this was a question.

The rationale behind using پ.ن instead of بەیانی is that, it's short version of it, just as AM.
Usually it's a preferred way of using those post-fixes with time in Kurdish language, not sure if we use بەیانی and ئێوارە whatsoever.

Copy link
Owner

Choose a reason for hiding this comment

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

alright, thanks for this explanation

@iamkun iamkun merged commit efd3904 into iamkun:dev Mar 1, 2022
iamkun pushed a commit that referenced this pull request Mar 14, 2022
# [1.11.0](v1.10.8...v1.11.0) (2022-03-14)

### Bug Fixes

* Add Kirundi (rn) locale ([#1793](#1793)) ([74e5247](74e5247))
* add missing date shorthand D type definition ([#1752](#1752)) ([b045baf](b045baf))
* Add relative time to Galician (gl) and fix ordinals ([#1800](#1800)) ([dcbf170](dcbf170))
* update German locales (de-at, de-ch) ([#1775](#1775)) ([f9055a7](f9055a7))
* update Icelandic [is] locale relativeTime config ([#1796](#1796)) ([76f9e17](76f9e17))
* Update index.d.ts note ([#1716](#1716)) ([5a108ff](5a108ff))
* Update locale German [de] monthsShort ([#1746](#1746)) ([4a7b7d0](4a7b7d0))
* update meridiem function to Kurdish (ku) locale ([#1725](#1725)) ([efd3904](efd3904))
* update updateLocal plugin typescript types ([#1692](#1692)) ([c7a3f73](c7a3f73))

### Features

* Fallback to language only locale + support uppercase locales ([#1524](#1524)) ([9138dc2](9138dc2))
@iamkun
Copy link
Owner

iamkun commented Mar 14, 2022

🎉 This PR is included in version 1.11.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

andrewhood125ruhuc added a commit to andrewhood125ruhuc/SidRH2 that referenced this pull request May 10, 2022
# [1.11.0](iamkun/dayjs@v1.10.8...v1.11.0) (2022-03-14)

### Bug Fixes

* Add Kirundi (rn) locale ([#1793](iamkun/dayjs#1793)) ([74e5247](iamkun/dayjs@74e5247))
* add missing date shorthand D type definition ([#1752](iamkun/dayjs#1752)) ([b045baf](iamkun/dayjs@b045baf))
* Add relative time to Galician (gl) and fix ordinals ([#1800](iamkun/dayjs#1800)) ([dcbf170](iamkun/dayjs@dcbf170))
* update German locales (de-at, de-ch) ([#1775](iamkun/dayjs#1775)) ([f9055a7](iamkun/dayjs@f9055a7))
* update Icelandic [is] locale relativeTime config ([#1796](iamkun/dayjs#1796)) ([76f9e17](iamkun/dayjs@76f9e17))
* Update index.d.ts note ([#1716](iamkun/dayjs#1716)) ([5a108ff](iamkun/dayjs@5a108ff))
* Update locale German [de] monthsShort ([#1746](iamkun/dayjs#1746)) ([4a7b7d0](iamkun/dayjs@4a7b7d0))
* update meridiem function to Kurdish (ku) locale ([#1725](iamkun/dayjs#1725)) ([efd3904](iamkun/dayjs@efd3904))
* update updateLocal plugin typescript types ([#1692](iamkun/dayjs#1692)) ([c7a3f73](iamkun/dayjs@c7a3f73))

### Features

* Fallback to language only locale + support uppercase locales ([#1524](iamkun/dayjs#1524)) ([9138dc2](iamkun/dayjs@9138dc2))
andrewhood125ruhuc added a commit to andrewhood125ruhuc/SidRH2 that referenced this pull request May 10, 2022
# [1.11.0](iamkun/dayjs@v1.10.8...v1.11.0) (2022-03-14)

### Bug Fixes

* Add Kirundi (rn) locale ([#1793](iamkun/dayjs#1793)) ([74e5247](iamkun/dayjs@74e5247))
* add missing date shorthand D type definition ([#1752](iamkun/dayjs#1752)) ([b045baf](iamkun/dayjs@b045baf))
* Add relative time to Galician (gl) and fix ordinals ([#1800](iamkun/dayjs#1800)) ([dcbf170](iamkun/dayjs@dcbf170))
* update German locales (de-at, de-ch) ([#1775](iamkun/dayjs#1775)) ([f9055a7](iamkun/dayjs@f9055a7))
* update Icelandic [is] locale relativeTime config ([#1796](iamkun/dayjs#1796)) ([76f9e17](iamkun/dayjs@76f9e17))
* Update index.d.ts note ([#1716](iamkun/dayjs#1716)) ([5a108ff](iamkun/dayjs@5a108ff))
* Update locale German [de] monthsShort ([#1746](iamkun/dayjs#1746)) ([4a7b7d0](iamkun/dayjs@4a7b7d0))
* update meridiem function to Kurdish (ku) locale ([#1725](iamkun/dayjs#1725)) ([efd3904](iamkun/dayjs@efd3904))
* update updateLocal plugin typescript types ([#1692](iamkun/dayjs#1692)) ([c7a3f73](iamkun/dayjs@c7a3f73))

### Features

* Fallback to language only locale + support uppercase locales ([#1524](iamkun/dayjs#1524)) ([9138dc2](iamkun/dayjs@9138dc2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kurdish language is missing meridiem function
2 participants