Skip to content

Commit

Permalink
Add Amharic support
Browse files Browse the repository at this point in the history
See [#220][0].

[0]: #220
  • Loading branch information
OMikiasO authored and EvanHahn committed Mar 29, 2024
1 parent 83ff853 commit 52ff733
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 2 deletions.
4 changes: 4 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Unreleased

- new: Amharic support (`am`)

# 3.31.0 / 2023-11-10

- new: Central Kurdish support (`ckb`)
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ Humanize Duration supports the following languages:
| -------------------- | -------- |
| Afrikaans | `af` |
| Albanian | `sq` |
| Amharic | `am` |
| Arabic | `ar` |
| Basque | `eu` |
| Bengali | `bn` |
Expand Down Expand Up @@ -447,6 +448,7 @@ Lovingly made by [Evan Hahn](https://evanhahn.com/) with help from:
- [Aryan Rawlani](https://github.com/aryanrawlani28) for Hindi support
- [Kristijan Jesenski](https://github.com/kjesenski) for Slovenian support
- [Michal Karzel](https://github.com/Misioka) for improving Arabic support
- [Mikias Menjeta](https://github.com/OMikiasO) for Amharic support
Licensed under the permissive [Unlicense](https://unlicense.org/). Enjoy!
Expand Down
3 changes: 2 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"Aryan Rawlani (https://github.com/aryanrawlani28)",
"Kristijan Jesenski (https://github.com/kjesenski)",
"Michal Karzel (https://github.com/Misioka)",
"Batmend Ganbaatar (https://github.com/theironbatka)"
"Batmend Ganbaatar (https://github.com/theironbatka)",
"Mikias Menjeta (https://github.com/OMikiasO)"
],
"version": "3.31.0",
"description": "Convert millisecond durations to English and many other languages.",
Expand Down
10 changes: 10 additions & 0 deletions humanize-duration.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,16 @@
},
","
),
am: language(
"ዓመት",
"ወር",
"ሳምንት",
"ቀን",
"ሰዓት",
"ደቂቃ",
"ሰከንድ",
"ሚሊሰከንድ"
),
ar: assign(
language(
function (c) {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"Aryan Rawlani (https://github.com/aryanrawlani28)",
"Kristijan Jesenski (https://github.com/kjesenski)",
"Michal Karzel (https://github.com/Misioka)",
"Batmend Ganbaatar (https://github.com/theironbatka)"
"Batmend Ganbaatar (https://github.com/theironbatka)",
"Mikias Menjeta (https://github.com/OMikiasO)"
],
"version": "3.31.0",
"description": "Convert millisecond durations to English and many other languages.",
Expand Down
72 changes: 72 additions & 0 deletions test/definitions/am.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
0 0 ሚሊሰከንድ
1 1 ሚሊሰከንድ
2 2 ሚሊሰከንድ
5 5 ሚሊሰከንድ
12 12 ሚሊሰከንድ
420 420 ሚሊሰከንድ
500 500 ሚሊሰከንድ
1000 1 ሰከንድ
1500 1 ሰከንድ+500 ሚሊሰከንድ
2000 2 ሰከንድ
2500 2 ሰከንድ+500 ሚሊሰከንድ
3000 3 ሰከንድ
1001 1 ሰከንድ+1 ሚሊሰከንድ
1002 1 ሰከንድ+2 ሚሊሰከንድ
2001 2 ሰከንድ+1 ሚሊሰከንድ
2003 2 ሰከንድ+3 ሚሊሰከንድ
1200 1 ሰከንድ+200 ሚሊሰከንድ
6900 6 ሰከንድ+900 ሚሊሰከንድ
30000 30 ሰከንድ
60000 1 ደቂቃ
90000 1 ደቂቃ+30 ሰከንድ
120000 2 ደቂቃ
150000 2 ደቂቃ+30 ሰከንድ
180000 3 ደቂቃ
61000 1 ደቂቃ+1 ሰከንድ
78000 1 ደቂቃ+18 ሰከንድ
61001 1 ደቂቃ+1 ሰከንድ+1 ሚሊሰከንድ
61005 1 ደቂቃ+1 ሰከንድ+5 ሚሊሰከንድ
62001 1 ደቂቃ+2 ሰከንድ+1 ሚሊሰከንድ
62005 1 ደቂቃ+2 ሰከንድ+5 ሚሊሰከንድ
121001 2 ደቂቃ+1 ሰከንድ+1 ሚሊሰከንድ
121007 2 ደቂቃ+1 ሰከንድ+7 ሚሊሰከንድ
138001 2 ደቂቃ+18 ሰከንድ+1 ሚሊሰከንድ
138006 2 ደቂቃ+18 ሰከንድ+6 ሚሊሰከንድ
1800000 30 ደቂቃ
3600000 1 ሰዓት
5400000 1 ሰዓት+30 ደቂቃ
7200000 2 ሰዓት
9000000 2 ሰዓት+30 ደቂቃ
10800000 3 ሰዓት
3660000 1 ሰዓት+1 ደቂቃ
3720000 1 ሰዓት+2 ደቂቃ
10860000 3 ሰዓት+1 ደቂቃ
11040000 3 ሰዓት+4 ደቂቃ
43200000 12 ሰዓት
86400000 1 ቀን
129600000 1 ቀን+12 ሰዓት
172800000 2 ቀን
216000000 2 ቀን+12 ሰዓት
259200000 3 ቀን
302400000 3 ቀን+12 ሰዓት
604800000 1 ሳምንት
907200000 1 ሳምንት+3 ቀን+12 ሰዓት
1209600000 2 ሳምንት
1512000000 2 ሳምንት+3 ቀን+12 ሰዓት
1814400000 3 ሳምንት
1314900000 2 ሳምንት+1 ቀን+5 ሰዓት+15 ደቂቃ
2629800000 1 ወር
3944700000 1 ወር+2 ሳምንት+1 ቀን+5 ሰዓት+15 ደቂቃ
5259600000 2 ወር
6574500000 2 ወር+2 ሳምንት+1 ቀን+5 ሰዓት+15 ደቂቃ
7889400000 3 ወር
15778800000 6 ወር
31557600000 1 ዓመት
47336400000 1 ዓመት+6 ወር
63115200000 2 ዓመት
78894000000 2 ዓመት+6 ወር
94672800000 3 ዓመት
-420 420 ሚሊሰከንድ
0.12 0.12 ሚሊሰከንድ
1.5 1.5 ሚሊሰከንድ
420.69 420.69 ሚሊሰከንድ

0 comments on commit 52ff733

Please sign in to comment.