Socket
Socket
Sign inDemoInstall

date-fns-tz

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

date-fns-tz - npm Package Compare versions

Comparing version 1.3.3 to 1.3.4

2

_lib/tzParseTimezone/index.js

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

try {
Intl.DateTimeFormat(undefined, {
new Intl.DateTimeFormat(undefined, {
timeZone: timeZoneString

@@ -130,0 +130,0 @@ });

@@ -140,3 +140,3 @@ import tzTokenizeDate from '../tzTokenizeDate/index.js'

try {
Intl.DateTimeFormat(undefined, { timeZone: timeZoneString })
new Intl.DateTimeFormat(undefined, { timeZone: timeZoneString })
validIANATimezoneCache[timeZoneString] = true

@@ -143,0 +143,0 @@ return true

{
"name": "date-fns-tz",
"version": "1.3.3",
"version": "1.3.4",
"sideEffects": false,

@@ -5,0 +5,0 @@ "description": "Time zone support for date-fns v2 with the Intl API",

@@ -8,3 +8,3 @@ # date-fns-tz

[necessary features](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat#Browser_compatibility),
and for those that don't a [polyfill](https://github.com/yahoo/date-time-format-timezone) can be used.
and for those that don't a [polyfill](https://formatjs.io/docs/polyfills/intl-datetimeformat) can be used.

@@ -49,2 +49,3 @@ If you do not wish to use a polyfill the time zones can still be specified as offsets

any time zone
- [Usage with Android](#usage-with-android)

@@ -284,2 +285,17 @@ ## Overview

## Usage with Android
This library works with React Native, however the `Intl` API is not available by default on Android.
In projects that do not use Hermes, make this change to `android/app/build.gradle`:
```diff
- def jscFlavor = 'org.webkit:android-jsc:+'
+ def jscFlavor = 'org.webkit:android-jsc-intl:+'
```
React Native does not currently support `Intl` on Android with
Hermes ([facebook/hermes#23](https://github.com/facebook/hermes/issues/23)). The best bet
seems to be using the [polyfills by Format.JS](https://formatjs.io/docs/polyfills/intl-datetimeformat).
## Usage with Node.js

@@ -289,2 +305,3 @@

i.e. this library will just work.
Node.js v12, which reaches end of life on 30 April 2022, requires running with

@@ -291,0 +308,0 @@ [full ICU data provided at runtime](https://nodejs.org/docs/latest-v12.x/api/intl.html#intl_providing_icu_data_at_runtime).

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