Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@shopify/dates

Package Overview
Dependencies
Maintainers
19
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shopify/dates - npm Package Compare versions

Comparing version 0.0.0-snapshot-20221110184102 to 0.0.0-snapshot-20221111164351

15

build/cjs/utilities/formatDate.js

@@ -17,7 +17,5 @@ 'use strict';

}
const browserFeatureDetectionDate = Intl.DateTimeFormat('en', {
hour: 'numeric',
// FormatJS's DateTimeFormat only supports the Gregorian calendar
// link: https://formatjs.io/docs/polyfills/intl-datetimeformat/
calendar: 'gregory'
const browserFeatureDetectionDate = options => Intl.DateTimeFormat('en', { ...options,
hour: 'numeric'
}); // hourCycle to Intl.DateTimeFormatOptions was added in TS 4.2, so we could

@@ -27,5 +25,8 @@ // remove this, but that would require consumers to update to at least TS 4.2

const resolvedOptions = typeof browserFeatureDetectionDate.resolvedOptions === 'undefined' ? undefined : browserFeatureDetectionDate.resolvedOptions();
const resolvedOptions = options => typeof browserFeatureDetectionDate(options).resolvedOptions === 'undefined' ? undefined : browserFeatureDetectionDate(options).resolvedOptions();
function formatDate(date, locales, options = {}) {
const hourCycleRequired = resolvedOptions != null && options.hour12 === false && resolvedOptions.hourCycle != null;
const ro = resolvedOptions(options);
const hourCycleRequired = ro != null && options.hour12 === false && ro.hourCycle != null;

@@ -32,0 +33,0 @@ if (hourCycleRequired) {

{
"name": "@shopify/dates",
"version": "0.0.0-snapshot-20221110184102",
"version": "0.0.0-snapshot-20221111164351",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "Lightweight date operations library",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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