New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

timezone-js-ts

Package Overview
Dependencies
Maintainers
0
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

timezone-js-ts - npm Package Compare versions

Comparing version 1.1.26 to 1.1.27

2

dist/index.d.ts

@@ -1,2 +0,2 @@

export declare function getCurrentTime(timezone: string, locale?: string): string;
export declare function getCurrentTime(timezone: string, localeIdentifier?: string): string;
export declare function getAllZones(): {

@@ -3,0 +3,0 @@ id: number;

@@ -39,3 +39,3 @@ "use strict";

const zoneData = __importStar(require("./all_timezone_lists.json"));
function getCurrentTime(timezone, locale) {
function getCurrentTime(timezone, localeIdentifier) {
const date = new Date();

@@ -47,3 +47,3 @@ const configOptions = {

};
return new Intl.DateTimeFormat(locale ? locale : 'en-GB', configOptions).format(date);
return new Intl.DateTimeFormat(localeIdentifier ? localeIdentifier : 'en-GB', configOptions).format(date);
}

@@ -50,0 +50,0 @@ function getAllZones() {

@@ -10,3 +10,3 @@ const fs = require('fs');

function getCurrentTime(timezone, locale = 'en-GB') {
function getCurrentTime(timezone, localeIdentifier = 'en-GB') {
const date = new Date();

@@ -18,3 +18,3 @@ const configOptions = {

};
return new Intl.DateTimeFormat(locale, configOptions).format(date);
return new Intl.DateTimeFormat(localeIdentifier, configOptions).format(date);
}

@@ -21,0 +21,0 @@

{
"name": "timezone-js-ts",
"version": "1.1.26",
"version": "1.1.27",
"description": "",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

import * as zoneData from './all_timezone_lists.json';
export function getCurrentTime(timezone: string, locale?: string) {
export function getCurrentTime(timezone: string, localeIdentifier?: string) {
const date = new Date();

@@ -11,3 +11,3 @@ const configOptions: any = {

};
return new Intl.DateTimeFormat(locale ? locale : 'en-GB', configOptions).format(date);
return new Intl.DateTimeFormat(localeIdentifier ? localeIdentifier : 'en-GB', configOptions).format(date);
}

@@ -14,0 +14,0 @@

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