humanize-duration
Advanced tools
Comparing version 2.6.1 to 2.7.0
@@ -17,2 +17,12 @@ // HumanizeDuration.js - http://git.io/j0HgmQ | ||
var languages = { | ||
ar: { | ||
year: function(c) { return ((c === 1) ? "سنة" : "سنوات"); }, | ||
month: function(c) { return ((c === 1) ? "شهر" : "أشهر"); }, | ||
week: function(c) { return ((c === 1) ? "أسبوع" : "أسابيع"); }, | ||
day: function(c) { return ((c === 1) ? "يوم" : "أيام"); }, | ||
hour: function(c) { return ((c === 1) ? "ساعة" : "ساعات"); }, | ||
minute: function(c) { return ((c === 1) ? "دقيقة" : "دقائق"); }, | ||
second: function(c) { return ((c === 1) ? "ثانية" : "ثواني"); }, | ||
millisecond: function(c) { return ((c === 1) ? "جزء من الثانية" : "أجزاء من الثانية"); } | ||
}, | ||
ca: { | ||
@@ -58,12 +68,2 @@ year: function(c) { return "any" + ((c !== 1) ? "s" : ""); }, | ||
}, | ||
nl: { | ||
year: "jaar", | ||
month: function(c) { return (c === 1) ? "maand" : "maanden"; }, | ||
week: function(c) { return (c === 1) ? "week" : "weken"; }, | ||
day: function(c) { return (c === 1) ? "dag" : "dagen"; }, | ||
hour: "uur", | ||
minute: function(c) { return (c === 1) ? "minuut" : "minuten"; }, | ||
second: function(c) { return (c === 1) ? "seconde" : "seconden"; }, | ||
millisecond: function(c) { return (c === 1) ? "milliseconde" : "milliseconden"; } | ||
}, | ||
es: { | ||
@@ -99,2 +99,12 @@ year: function(c) { return "año" + ((c !== 1) ? "s" : ""); }, | ||
}, | ||
it: { | ||
year: function(c) { return "ann" + ((c !== 1) ? "i" : "o"); }, | ||
month: function(c) { return "mes" + ((c !== 1) ? "i" : "e"); }, | ||
week: function(c) { return "settiman" + ((c !== 1) ? "e" : "a"); }, | ||
day: function(c) { return "giorn" + ((c !== 1) ? "i" : "o"); }, | ||
hour: function(c) { return "or" + ((c !== 1) ? "e" : "a"); }, | ||
minute: function(c) { return "minut" + ((c !== 1) ? "i" : "o"); }, | ||
second: function(c) { return "second" + ((c !== 1) ? "i" : "o"); }, | ||
millisecond: function(c) { return "millisecond" + ((c !== 1) ? "i" : "o" ); } | ||
}, | ||
ja: { | ||
@@ -120,2 +130,12 @@ year: "年", | ||
}, | ||
nl: { | ||
year: "jaar", | ||
month: function(c) { return (c === 1) ? "maand" : "maanden"; }, | ||
week: function(c) { return (c === 1) ? "week" : "weken"; }, | ||
day: function(c) { return (c === 1) ? "dag" : "dagen"; }, | ||
hour: "uur", | ||
minute: function(c) { return (c === 1) ? "minuut" : "minuten"; }, | ||
second: function(c) { return (c === 1) ? "seconde" : "seconden"; }, | ||
millisecond: function(c) { return (c === 1) ? "milliseconde" : "milliseconden"; } | ||
}, | ||
nob: { | ||
@@ -306,3 +326,5 @@ year: "år", | ||
for (var prop in source) { | ||
destination[prop] = source[prop]; | ||
if (source.hasOwnProperty(prop)) { | ||
destination[prop] = source[prop]; | ||
} | ||
} | ||
@@ -309,0 +331,0 @@ } |
@@ -9,5 +9,8 @@ { | ||
"Michał Janiec (https://github.com/mjjaniec)", | ||
"Eileen Li (https://github.com/eileen3)" | ||
"Eileen Li (https://github.com/eileen3)", | ||
"Tommy Brunn (https://github.com/Nevon)", | ||
"Giovanni Pellerano (https://github.com/evilaliv3)", | ||
"Rahma Sghaier (https://twitter.com/sghaierrahma)" | ||
], | ||
"version": "2.6.1", | ||
"version": "2.7.0", | ||
"description": "Convert millisecond durations to English and many other languages.", | ||
@@ -36,15 +39,3 @@ "homepage": "https://github.com/EvanHahn/HumanizeDuration.js", | ||
"years", | ||
"months", | ||
"english", | ||
"spanish", | ||
"french", | ||
"catalan", | ||
"portuguese", | ||
"korean", | ||
"norwegian", | ||
"german", | ||
"danish", | ||
"russian", | ||
"turkish", | ||
"hungarian" | ||
"months" | ||
], | ||
@@ -51,0 +42,0 @@ "repository": { |
@@ -102,3 +102,3 @@ Humanize Duration | ||
} | ||
}); | ||
}) | ||
@@ -111,3 +111,4 @@ shortEnglishHumanizer(15600000) // "4 h, 20 m" | ||
```js | ||
var humanizer = humanizeDuration.humanizer(); | ||
var humanizer = humanizeDuration.humanizer() | ||
humanizer.languages.shortEn = { | ||
@@ -125,2 +126,3 @@ year: function(c) { return c + "y"; }, | ||
* Arabic (ar) | ||
* Catalan (ca) | ||
@@ -135,2 +137,3 @@ * Chinese, simplified (zh-CN) | ||
* Hungarian (hu) | ||
* Italian (it) | ||
* Japanese (ja) | ||
@@ -149,4 +152,13 @@ * Korean (ko) | ||
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. | ||
Lovingly made by [Evan Hahn](http://evanhahn.com/) with help from: | ||
* [Martin Prins](https://github.com/magarcia) for language support | ||
* [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 | ||
* [Tommy Brunn](https://github.com/Nevon) for Swedish support | ||
* [Giovanni Pellerano](https://github.com/evilaliv3) for Italian support | ||
* [Rahma Sghaier](https://twitter.com/sghaierrahma) for Arabic support | ||
Licensed under the WTFPL, so you can do whatever you want. Enjoy! |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22165
12
341
160