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

timezone-js

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

timezone-js - npm Package Compare versions

Comparing version 0.4.5 to 0.4.6

2

package.json

@@ -13,3 +13,3 @@ {

"description": "JavaScript timezone library based on Olson timezone data",
"version": "0.4.5",
"version": "0.4.6",
"main": "src/date.js",

@@ -16,0 +16,0 @@ "homepage": "https://github.com/mde/timezone-js",

@@ -50,3 +50,3 @@ # TimezoneJS.Date

If you use `timezoneJS.Date` with `Fleegix.js`, there's nothing else you need to do -- timezones for North America will be loaded and parsed on initial page load, and others will be downloaded and parsed on-the-fly, as needed. If you want to use this code with some other JavaScript toolkit, you'll need to overwrite your own transport method by setting `timezoneJS.timezone.transport = someFunction` method. Take a look at `test-utils.js` in `spec` for an example.
If you use `timezoneJS.Date` with `Fleegix.js`, `jQuery` or `jQuery`-compatible libraries (like `Zepto.js`), there's nothing else you need to do -- timezones for North America will be loaded and parsed on initial page load, and others will be downloaded and parsed on-the-fly, as needed. If you want to use this code with some other JavaScript toolkit, you'll need to overwrite your own transport method by setting `timezoneJS.timezone.transport = someFunction` method. Take a look at `test-utils.js` in `spec` for an example.

@@ -61,3 +61,3 @@ ## Usage

`dt_str_tz` is a date string containing timezone information, i.e. containing 'Z', 'T' or a timezone offset matching the regular expression /[+-][0-9]{4}/ (e.g. '+0200'). The [one-stop shop for cross-browser JavaScript Date parsing behavior](http://dygraphs.com/date-formats.html) provides detailed information about JavaScript date formats.
`dt_str_tz` is a date string containing timezone information, i.e. containing `Z`, `T` or a timezone offset matching the regular expression `/[+-][0-9]{4}/` (e.g. `+0200`). The [one-stop shop for cross-browser JavaScript Date parsing behavior](http://dygraphs.com/date-formats.html) provides detailed information about JavaScript date formats.

@@ -64,0 +64,0 @@ In the following cases the date is assumed to be a date in timezone `tz` or a locale date if `tz` is not provided:

@@ -153,2 +153,7 @@ var TestUtils = require('./test-utils')

it('should get correct region for tz', function () {
var t = timezoneJS.timezone.getRegionForTimezone('America/New_York');
expect(t).toEqual('northamerica');
});
//This is for issue #1 in github

@@ -155,0 +160,0 @@ it('should not get null in getAllZones', function () {

@@ -151,3 +151,3 @@ // -----

? fleegix.xhr.doReq({ url: opts.url, async: false })
: jQuery.ajax({ url : opts.url, async : false }).responseText;
: jQuery.ajax({ url : opts.url, async : false, dataType: 'text' }).responseText;
}

@@ -852,2 +852,3 @@ return fleegix && fleegix.xhr

};
this.getRegionForTimezone = getRegionForTimezone;
this.loadingScheme = this.loadingSchemes.LAZY_LOAD;

@@ -854,0 +855,0 @@ this.loadedZones = {};

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