timezone-js-ts
Advanced tools
Comparing version 1.1.27 to 1.1.28
@@ -46,3 +46,14 @@ "use strict"; | ||
}; | ||
return new Intl.DateTimeFormat(localeIdentifier ? localeIdentifier : 'en-GB', configOptions).format(date); | ||
let result = new Intl.DateTimeFormat(localeIdentifier ? localeIdentifier : 'en-GB', configOptions).format(date); | ||
const findTz = result.find((z) => z.type === 'timeZoneName'); | ||
var str = findTz.value; | ||
let arr = []; | ||
for (var i = 0; i < str.length; i++) { | ||
if (str.charAt(i) === str.charAt(i).toUpperCase()) { | ||
if (str.charAt(i) !== " ") { | ||
arr.push(str.charAt(i)); | ||
} | ||
} | ||
} | ||
return `${result} ${arr.join("")}`; | ||
} | ||
@@ -49,0 +60,0 @@ function getAllZones() { |
{ | ||
"name": "timezone-js-ts", | ||
"version": "1.1.27", | ||
"version": "1.1.28", | ||
"description": "", | ||
@@ -17,3 +17,7 @@ "main": "./dist/index.js", | ||
], | ||
"author": "", | ||
"files": [ | ||
"dist", | ||
"package.json" | ||
], | ||
"author": "Ragul Jayakanthan", | ||
"license": "MIT", | ||
@@ -20,0 +24,0 @@ "devDependencies": { |
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
1
1
51317
4
2454