@amaui/date
Advanced tools
Comparing version 1.1.10 to 1.1.11
@@ -21,3 +21,3 @@ "use strict"; | ||
month: 30 * 24 * 60 * 60 * 1e3, | ||
year: 12 * 30 * 24 * 60 * 60 * 1e3, | ||
year: 12 * 30 * 24 * 60 * 60 * 1e3 | ||
}; | ||
@@ -31,3 +31,3 @@ const unitsAbbr = { | ||
month: 'mo', | ||
year: 'y', | ||
year: 'y' | ||
}; | ||
@@ -40,3 +40,8 @@ for (const unit of display) { | ||
valuesRaw[unit] = value_; | ||
values.push(`${value_}${(value_ > 1 && !unitAbbr) ? unitsAbbr[unit] : ''}`); | ||
let valueTime = value_; | ||
if (unitAbbr) | ||
valueTime = `${valueTime} ${unitsAbbr[unit]}`; | ||
else | ||
valueTime = `${valueTime} ${unit}${value_ > 1 ? 's' : ''}`; | ||
values.push(valueTime); | ||
} | ||
@@ -43,0 +48,0 @@ } |
@@ -40,3 +40,5 @@ import is from '@amaui/utils/is'; | ||
valuesRaw[unit] = value_; | ||
values.push("".concat(value_).concat(value_ > 1 && !unitAbbr ? unitsAbbr[unit] : '')); | ||
let valueTime = value_; | ||
if (unitAbbr) valueTime = "".concat(valueTime, " ").concat(unitsAbbr[unit]);else valueTime = "".concat(valueTime, " ").concat(unit).concat(value_ > 1 ? 's' : ''); | ||
values.push(valueTime); | ||
} | ||
@@ -43,0 +45,0 @@ } |
@@ -1,2 +0,2 @@ | ||
/** @license AmauiDate v1.1.10 | ||
/** @license AmauiDate v1.1.11 | ||
* | ||
@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the |
{ | ||
"name": "@amaui/date", | ||
"version": "1.1.10", | ||
"version": "1.1.11", | ||
"description": "Time and date utils library", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/amaui-org/amaui-date.git", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
449434
11132