Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

humanize-duration

Package Overview
Dependencies
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

humanize-duration - npm Package Compare versions

Comparing version 3.12.1 to 3.13.0

5

HISTORY.md

@@ -0,1 +1,6 @@

3.13.0 / 2018-03-19
===================
* new: Slovak support
3.12.1 / 2018-01-03

@@ -2,0 +7,0 @@ ===================

53

humanize-duration.js

@@ -39,10 +39,10 @@ // HumanizeDuration.js - http://git.io/j0HgmQ

cs: {
y: function (c) { return ['rok', 'roku', 'roky', 'let'][getCzechForm(c)] },
mo: function (c) { return ['měsíc', 'měsíce', 'měsíce', 'měsíců'][getCzechForm(c)] },
w: function (c) { return ['týden', 'týdne', 'týdny', 'týdnů'][getCzechForm(c)] },
d: function (c) { return ['den', 'dne', 'dny', 'dní'][getCzechForm(c)] },
h: function (c) { return ['hodina', 'hodiny', 'hodiny', 'hodin'][getCzechForm(c)] },
m: function (c) { return ['minuta', 'minuty', 'minuty', 'minut'][getCzechForm(c)] },
s: function (c) { return ['sekunda', 'sekundy', 'sekundy', 'sekund'][getCzechForm(c)] },
ms: function (c) { return ['milisekunda', 'milisekundy', 'milisekundy', 'milisekund'][getCzechForm(c)] },
y: function (c) { return ['rok', 'roku', 'roky', 'let'][getCzechOrSlovakForm(c)] },
mo: function (c) { return ['měsíc', 'měsíce', 'měsíce', 'měsíců'][getCzechOrSlovakForm(c)] },
w: function (c) { return ['týden', 'týdne', 'týdny', 'týdnů'][getCzechOrSlovakForm(c)] },
d: function (c) { return ['den', 'dne', 'dny', 'dní'][getCzechOrSlovakForm(c)] },
h: function (c) { return ['hodina', 'hodiny', 'hodiny', 'hodin'][getCzechOrSlovakForm(c)] },
m: function (c) { return ['minuta', 'minuty', 'minuty', 'minut'][getCzechOrSlovakForm(c)] },
s: function (c) { return ['sekunda', 'sekundy', 'sekundy', 'sekund'][getCzechOrSlovakForm(c)] },
ms: function (c) { return ['milisekunda', 'milisekundy', 'milisekundy', 'milisekund'][getCzechOrSlovakForm(c)] },
decimal: ','

@@ -292,2 +292,13 @@ },

},
sk: {
y: function (c) { return ['rok', 'roky', 'roky', 'rokov'][getCzechOrSlovakForm(c)] },
mo: function (c) { return ['mesiac', 'mesiace', 'mesiace', 'mesiacov'][getCzechOrSlovakForm(c)] },
w: function (c) { return ['týždeň', 'týždne', 'týždne', 'týždňov'][getCzechOrSlovakForm(c)] },
d: function (c) { return ['deň', 'dni', 'dni', 'dní'][getCzechOrSlovakForm(c)] },
h: function (c) { return ['hodina', 'hodiny', 'hodiny', 'hodín'][getCzechOrSlovakForm(c)] },
m: function (c) { return ['minúta', 'minúty', 'minúty', 'minút'][getCzechOrSlovakForm(c)] },
s: function (c) { return ['sekunda', 'sekundy', 'sekundy', 'sekúnd'][getCzechOrSlovakForm(c)] },
ms: function (c) { return ['milisekunda', 'milisekundy', 'milisekundy', 'milisekúnd'][getCzechOrSlovakForm(c)] },
decimal: ','
},
sv: {

@@ -504,15 +515,2 @@ y: 'år',

// Internal helper function for Czech language.
function getCzechForm (c) {
if (c === 1) {
return 0
} else if (Math.floor(c) !== c) {
return 1
} else if (c % 10 >= 2 && c % 10 <= 4 && c % 100 < 10) {
return 2
} else {
return 3
}
}
// Internal helper function for Polish language.

@@ -546,2 +544,15 @@ function getPolishForm (c) {

// Internal helper function for Slovak language.
function getCzechOrSlovakForm (c) {
if (c === 1) {
return 0
} else if (Math.floor(c) !== c) {
return 1
} else if (c % 10 >= 2 && c % 10 <= 4 && c % 100 < 10) {
return 2
} else {
return 3
}
}
// Internal helper function for Lithuanian language.

@@ -548,0 +559,0 @@ function getLithuanianForm (c) {

@@ -23,5 +23,6 @@ {

"Jesse Jackson (https://github.com/jsejcksn)",
"Caner Elci (https://github.com/canerelci)"
"Caner Elci (https://github.com/canerelci)",
"Matej Kolesár (https://github.com/rasel-sk)"
],
"version": "3.12.1",
"version": "3.13.0",
"description": "Convert millisecond durations to English and many other languages.",

@@ -28,0 +29,0 @@ "homepage": "https://github.com/EvanHahn/HumanizeDuration.js",

@@ -231,2 +231,3 @@ Humanize Duration

| Russian | `ru` |
| Slovak | `sk` |
| Spanish | `es` |

@@ -271,2 +272,3 @@ | Swedish | `sv` |

* [Caner Elci](https://github.com/canerelci) for Bulgarian support
* [Matej Kolesár](https://github.com/rasel-sk) for Slovak support

@@ -273,0 +275,0 @@ Licensed under the permissive [Unlicense](https://unlicense.org/). Enjoy!

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc