You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -96,15 +99,16 @@ var shortEnglishHumanizer = humanizeDuration.humanizer({
96
99
millisecond:function() { return"ms"; },
97
100
}
98
101
}
99
-
});
102
+
})
100
103
101
104
shortEnglishHumanizer(15600000) // "4 h, 20 m"
102
105
```
103
106
104
107
You can also add languages after initializing:
105
108
106
109
```js
107
-
var humanizer =humanizeDuration.humanizer();
110
+
var humanizer =humanizeDuration.humanizer()
111
+
108
112
humanizer.languages.shortEn= {
109
113
year:function(c) { return c +"y"; },
110
114
// ...
@@ -117,6 +121,7 @@ Supported languages
117
121
118
122
Humanize Duration supports the following languages:
119
123
124
+
* Arabic (ar)
120
125
* Catalan (ca)
121
126
* Chinese, simplified (zh-CN)
122
127
* Chinese, traditional (zh-TW)
@@ -125,6 +130,8 @@ Humanize Duration supports the following languages:
125
130
* English (en)
126
131
* French (fr)
127
132
* German (de)
133
+
* Hungarian (hu)
134
+
* Italian (it)
128
135
* Japanese (ja)
129
136
* Korean (ko)
130
137
* Norwegian (nob)
@@ -135,9 +142,25 @@ Humanize Duration supports the following languages:
135
142
* Swedish (sv)
136
143
* Turkish (tr)
137
144
145
+
For a list of supported languages, you can use the `getSupportedLanguages` function.
146
+
147
+
```js
148
+
humanizeDuration.getSupportedLanguages()
149
+
// ["ar", "ca", "da", "de" ...]
150
+
```
151
+
138
152
Credits
139
153
-------
140
154
141
-
Lovingly made by [Evan Hahn](http://evanhahn.com/) with language support by [Martin Prins](https://github.com/magarcia). Thanks to [Filipi Siqueira](https://github.com/filipi777) for Portuguese support, [Peter Rekdal Sunde](https://github.com/peters) for Norwegian support, [Michał Janiec](https://github.com/mjjaniec) for Polish support, [Eileen Li](https://github.com/eileen3) for Chinese support, and [Tommy Brunn](https://github.com/Nevon) for Swedish support.
155
+
Lovingly made by [Evan Hahn](http://evanhahn.com/) with help from:
156
+
157
+
* [Martin Prins](https://github.com/magarcia) for language support
158
+
* [Filipi Siqueira](https://github.com/filipi777) for Portuguese support
159
+
* [Peter Rekdal Sunde](https://github.com/peters) for Norwegian support
160
+
* [Michał Janiec](https://github.com/mjjaniec) for Polish support
161
+
* [Eileen Li](https://github.com/eileen3) for Chinese support
162
+
* [Tommy Brunn](https://github.com/Nevon) for Swedish support
163
+
* [Giovanni Pellerano](https://github.com/evilaliv3) for Italian support
164
+
* [Rahma Sghaier](https://twitter.com/sghaierrahma) for Arabic support
142
165
143
166
Licensed under the WTFPL, so you can do whatever you want. Enjoy!
0 commit comments