accessible-date
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -11,3 +11,14 @@ # Change Log | ||
- German Internationalization | ||
- Chinese Mandarin Internationalization | ||
- Japanese Internationalization | ||
- Portugese Internationalization | ||
- Russian Internationalization | ||
## [2.1.1] - 2024-01-07 | ||
### Changed | ||
- Changed all instances of deprecated `substr()` to `substring()`. | ||
- Changed some `let`s to `const`s. | ||
## [2.1.0] - 2024-01-07 | ||
@@ -14,0 +25,0 @@ |
@@ -141,4 +141,4 @@ "use strict"; | ||
const year = "".concat(dateToFormat.getUTCFullYear()); | ||
let century = dateParts.year[settings.language].century[parseInt(year.substr(0, 2))]; | ||
let decade = dateParts.year[settings.language].decade[parseInt(year.substr(2, 3))]; | ||
const century = dateParts.year[settings.language].century[parseInt(year.substring(0, 2))]; | ||
const decade = dateParts.year[settings.language].decade[parseInt(year.substring(2, 4))]; | ||
return "".concat(century, " ").concat(decade); | ||
@@ -145,0 +145,0 @@ })(), |
{ | ||
"name": "accessible-date", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Readable, accessible dates for screen readers.", | ||
@@ -5,0 +5,0 @@ "main": "dist/accessible-date.js", |
@@ -138,4 +138,4 @@ export default function accessibleDate(date, options) { | ||
const year = `${dateToFormat.getUTCFullYear()}`; | ||
let century = dateParts.year[settings.language].century[parseInt(year.substr(0, 2))]; | ||
let decade = dateParts.year[settings.language].decade[parseInt(year.substr(2, 3))]; | ||
const century = dateParts.year[settings.language].century[parseInt(year.substring(0, 2))]; | ||
const decade = dateParts.year[settings.language].decade[parseInt(year.substring(2, 4))]; | ||
return `${century} ${decade}`; | ||
@@ -142,0 +142,0 @@ })(), |
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
76666