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.5.2 to 0.5.3

2

build/cjs/apply-time-zone-offset.js

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

var _getTimeZoneOffset = require("./get-time-zone-offset");
var _getTimeZoneOffset = require("./get-time-zone-offset.js");

@@ -11,0 +11,0 @@ function applyTimeZoneOffset(date, timeZone1, timeZone2) {

@@ -10,5 +10,5 @@ "use strict";

var _utilities = require("./utilities");
var _index = require("./utilities/index.js");
var _sanitiseDateString = require("./sanitise-date-string");
var _sanitiseDateString = require("./sanitise-date-string.js");

@@ -124,3 +124,3 @@ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class;

var yearString = (0, _utilities.formatDate)(date, 'en', {
var yearString = (0, _index.formatDate)(date, 'en', {
timeZone: timeZone,

@@ -141,3 +141,3 @@ year: 'numeric'

value: function getMonth(date, timeZone) {
var monthString = (0, _utilities.formatDate)(date, 'en', {
var monthString = (0, _index.formatDate)(date, 'en', {
timeZone: timeZone,

@@ -158,3 +158,3 @@ month: 'numeric'

value: function getDay(date, timeZone) {
var dayString = (0, _utilities.formatDate)(date, 'en', {
var dayString = (0, _index.formatDate)(date, 'en', {
timeZone: timeZone,

@@ -175,3 +175,3 @@ day: 'numeric'

value: function getWeekday(date, timeZone) {
var weekdayString = (0, _utilities.formatDate)(date, 'en', {
var weekdayString = (0, _index.formatDate)(date, 'en', {
timeZone: timeZone,

@@ -186,3 +186,3 @@ weekday: 'long'

value: function getHour(date, timeZone) {
var hourString = (0, _utilities.formatDate)(date, 'en', {
var hourString = (0, _index.formatDate)(date, 'en', {
timeZone: timeZone,

@@ -203,3 +203,3 @@ hour12: false,

value: function getMinute(date, timeZone) {
var minuteString = (0, _utilities.formatDate)(date, 'en', {
var minuteString = (0, _index.formatDate)(date, 'en', {
timeZone: timeZone,

@@ -219,3 +219,3 @@ minute: 'numeric'

value: function getSecond(date, timeZone) {
var secondString = (0, _utilities.formatDate)(date, 'en', {
var secondString = (0, _index.formatDate)(date, 'en', {
timeZone: timeZone,

@@ -235,3 +235,3 @@ second: 'numeric'

value: function getTimePartsFallback(date, timeZone) {
var timeString = (0, _utilities.formatDate)(date, 'en', {
var timeString = (0, _index.formatDate)(date, 'en', {
timeZone: timeZone,

@@ -238,0 +238,0 @@ hour12: false,

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

var _getDateTimeParts2 = require("./get-date-time-parts");
var _getDateTimeParts2 = require("./get-date-time-parts.js");

@@ -11,0 +11,0 @@ function getTimeZoneOffset() {

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

var _applyTimeZoneOffset = require("./apply-time-zone-offset");
var _applyTimeZoneOffset = require("./apply-time-zone-offset.js");

@@ -20,5 +20,5 @@ Object.keys(_applyTimeZoneOffset).forEach(function (key) {

var _constants = require("./constants");
var _index = require("./constants/index.js");
Object.keys(_constants).forEach(function (key) {
Object.keys(_index).forEach(function (key) {
if (key === "default" || key === "__esModule") return;

@@ -28,3 +28,3 @@ Object.defineProperty(exports, key, {

get: function get() {
return _constants[key];
return _index[key];
}

@@ -34,3 +34,3 @@ });

var _getDateTimeParts = require("./get-date-time-parts");
var _getDateTimeParts = require("./get-date-time-parts.js");

@@ -47,3 +47,3 @@ Object.keys(_getDateTimeParts).forEach(function (key) {

var _getTimeZoneOffset = require("./get-time-zone-offset");
var _getTimeZoneOffset = require("./get-time-zone-offset.js");

@@ -60,3 +60,3 @@ Object.keys(_getTimeZoneOffset).forEach(function (key) {

var _isFutureDate = require("./is-future-date");
var _isFutureDate = require("./is-future-date.js");

@@ -73,3 +73,3 @@ Object.keys(_isFutureDate).forEach(function (key) {

var _isLessThanOneDayAgo = require("./is-less-than-one-day-ago");
var _isLessThanOneDayAgo = require("./is-less-than-one-day-ago.js");

@@ -86,3 +86,3 @@ Object.keys(_isLessThanOneDayAgo).forEach(function (key) {

var _isLessThanOneHourAgo = require("./is-less-than-one-hour-ago");
var _isLessThanOneHourAgo = require("./is-less-than-one-hour-ago.js");

@@ -99,3 +99,3 @@ Object.keys(_isLessThanOneHourAgo).forEach(function (key) {

var _isLessThanOneMinuteAgo = require("./is-less-than-one-minute-ago");
var _isLessThanOneMinuteAgo = require("./is-less-than-one-minute-ago.js");

@@ -112,3 +112,3 @@ Object.keys(_isLessThanOneMinuteAgo).forEach(function (key) {

var _isLessThanOneWeekAgo = require("./is-less-than-one-week-ago");
var _isLessThanOneWeekAgo = require("./is-less-than-one-week-ago.js");

@@ -125,3 +125,3 @@ Object.keys(_isLessThanOneWeekAgo).forEach(function (key) {

var _isLessThanOneWeekAway = require("./is-less-than-one-week-away");
var _isLessThanOneWeekAway = require("./is-less-than-one-week-away.js");

@@ -138,3 +138,3 @@ Object.keys(_isLessThanOneWeekAway).forEach(function (key) {

var _isLessThanOneYearAgo = require("./is-less-than-one-year-ago");
var _isLessThanOneYearAgo = require("./is-less-than-one-year-ago.js");

@@ -151,3 +151,3 @@ Object.keys(_isLessThanOneYearAgo).forEach(function (key) {

var _isLessThanOneYearAway = require("./is-less-than-one-year-away");
var _isLessThanOneYearAway = require("./is-less-than-one-year-away.js");

@@ -164,3 +164,3 @@ Object.keys(_isLessThanOneYearAway).forEach(function (key) {

var _isSameDay = require("./is-same-day");
var _isSameDay = require("./is-same-day.js");

@@ -177,3 +177,3 @@ Object.keys(_isSameDay).forEach(function (key) {

var _isSameMonth = require("./is-same-month");
var _isSameMonth = require("./is-same-month.js");

@@ -190,3 +190,3 @@ Object.keys(_isSameMonth).forEach(function (key) {

var _isSameYear = require("./is-same-year");
var _isSameYear = require("./is-same-year.js");

@@ -203,3 +203,3 @@ Object.keys(_isSameYear).forEach(function (key) {

var _isToday = require("./is-today");
var _isToday = require("./is-today.js");

@@ -216,3 +216,3 @@ Object.keys(_isToday).forEach(function (key) {

var _isYesterday = require("./is-yesterday");
var _isYesterday = require("./is-yesterday.js");

@@ -229,3 +229,3 @@ Object.keys(_isYesterday).forEach(function (key) {

var _isTomorrow = require("./is-tomorrow");
var _isTomorrow = require("./is-tomorrow.js");

@@ -242,3 +242,3 @@ Object.keys(_isTomorrow).forEach(function (key) {

var _parseDateString = require("./parse-date-string");
var _parseDateString = require("./parse-date-string.js");

@@ -255,3 +255,3 @@ Object.keys(_parseDateString).forEach(function (key) {

var _parseDateStringParts = require("./parse-date-string-parts");
var _parseDateStringParts = require("./parse-date-string-parts.js");

@@ -268,3 +268,3 @@ Object.keys(_parseDateStringParts).forEach(function (key) {

var _sanitiseDateString = require("./sanitise-date-string");
var _sanitiseDateString = require("./sanitise-date-string.js");

@@ -281,3 +281,3 @@ Object.keys(_sanitiseDateString).forEach(function (key) {

var _unapplyTimeZoneOffset = require("./unapply-time-zone-offset");
var _unapplyTimeZoneOffset = require("./unapply-time-zone-offset.js");

@@ -294,3 +294,3 @@ Object.keys(_unapplyTimeZoneOffset).forEach(function (key) {

var _mapDeprecatedTimezones = require("./map-deprecated-timezones");
var _mapDeprecatedTimezones = require("./map-deprecated-timezones.js");

@@ -307,5 +307,5 @@ Object.keys(_mapDeprecatedTimezones).forEach(function (key) {

var _utilities = require("./utilities");
var _index2 = require("./utilities/index.js");
Object.keys(_utilities).forEach(function (key) {
Object.keys(_index2).forEach(function (key) {
if (key === "default" || key === "__esModule") return;

@@ -315,5 +315,5 @@ Object.defineProperty(exports, key, {

get: function get() {
return _utilities[key];
return _index2[key];
}
});
});

@@ -8,9 +8,9 @@ "use strict";

var _isFutureDate = require("./is-future-date");
var _isFutureDate = require("./is-future-date.js");
var _constants = require("./constants");
var _index = require("./constants/index.js");
function isLessThanOneDayAgo(date) {
var now = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Date();
return !(0, _isFutureDate.isFutureDate)(date, now) && now.getTime() - date.getTime() < _constants.TimeUnit.Day;
return !(0, _isFutureDate.isFutureDate)(date, now) && now.getTime() - date.getTime() < _index.TimeUnit.Day;
}

@@ -8,9 +8,9 @@ "use strict";

var _isFutureDate = require("./is-future-date");
var _isFutureDate = require("./is-future-date.js");
var _constants = require("./constants");
var _index = require("./constants/index.js");
function isLessThanOneHourAgo(date) {
var now = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Date();
return !(0, _isFutureDate.isFutureDate)(date, now) && now.getTime() - date.getTime() < _constants.TimeUnit.Hour;
return !(0, _isFutureDate.isFutureDate)(date, now) && now.getTime() - date.getTime() < _index.TimeUnit.Hour;
}

@@ -8,9 +8,9 @@ "use strict";

var _isFutureDate = require("./is-future-date");
var _isFutureDate = require("./is-future-date.js");
var _constants = require("./constants");
var _index = require("./constants/index.js");
function isLessThanOneMinuteAgo(date) {
var now = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Date();
return !(0, _isFutureDate.isFutureDate)(date, now) && now.getTime() - date.getTime() < _constants.TimeUnit.Minute;
return !(0, _isFutureDate.isFutureDate)(date, now) && now.getTime() - date.getTime() < _index.TimeUnit.Minute;
}

@@ -8,9 +8,9 @@ "use strict";

var _isFutureDate = require("./is-future-date");
var _isFutureDate = require("./is-future-date.js");
var _constants = require("./constants");
var _index = require("./constants/index.js");
function isLessThanOneWeekAgo(date) {
var now = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Date();
return !(0, _isFutureDate.isFutureDate)(date, now) && now.getTime() - date.getTime() < _constants.TimeUnit.Week;
return !(0, _isFutureDate.isFutureDate)(date, now) && now.getTime() - date.getTime() < _index.TimeUnit.Week;
}

@@ -8,9 +8,9 @@ "use strict";

var _isFutureDate = require("./is-future-date");
var _isFutureDate = require("./is-future-date.js");
var _constants = require("./constants");
var _index = require("./constants/index.js");
function isLessThanOneWeekAway(date) {
var now = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Date();
return (0, _isFutureDate.isFutureDate)(date, now) && date.getTime() - now.getTime() < _constants.TimeUnit.Week;
return (0, _isFutureDate.isFutureDate)(date, now) && date.getTime() - now.getTime() < _index.TimeUnit.Week;
}

@@ -8,9 +8,9 @@ "use strict";

var _isFutureDate = require("./is-future-date");
var _isFutureDate = require("./is-future-date.js");
var _constants = require("./constants");
var _index = require("./constants/index.js");
function isLessThanOneYearAgo(date) {
var now = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Date();
return !(0, _isFutureDate.isFutureDate)(date, now) && now.getTime() - date.getTime() < _constants.TimeUnit.Year;
return !(0, _isFutureDate.isFutureDate)(date, now) && now.getTime() - date.getTime() < _index.TimeUnit.Year;
}

@@ -8,9 +8,9 @@ "use strict";

var _isFutureDate = require("./is-future-date");
var _isFutureDate = require("./is-future-date.js");
var _constants = require("./constants");
var _index = require("./constants/index.js");
function isLessThanOneYearAway(date) {
var now = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Date();
return (0, _isFutureDate.isFutureDate)(date, now) && date.getTime() - now.getTime() < _constants.TimeUnit.Year;
return (0, _isFutureDate.isFutureDate)(date, now) && date.getTime() - now.getTime() < _index.TimeUnit.Year;
}

@@ -8,5 +8,5 @@ "use strict";

var _getDateTimeParts3 = require("./get-date-time-parts");
var _getDateTimeParts3 = require("./get-date-time-parts.js");
var _isSameMonth = require("./is-same-month");
var _isSameMonth = require("./is-same-month.js");

@@ -13,0 +13,0 @@ function isSameDay(date1, date2, timeZone) {

@@ -8,5 +8,5 @@ "use strict";

var _getDateTimeParts3 = require("./get-date-time-parts");
var _getDateTimeParts3 = require("./get-date-time-parts.js");
var _isSameYear = require("./is-same-year");
var _isSameYear = require("./is-same-year.js");

@@ -13,0 +13,0 @@ function isSameMonth(date1, date2, timeZone) {

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

var _getDateTimeParts3 = require("./get-date-time-parts");
var _getDateTimeParts3 = require("./get-date-time-parts.js");

@@ -11,0 +11,0 @@ function isSameYear(date1, date2, timeZone) {

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

var _isSameDay = require("./is-same-day");
var _isSameDay = require("./is-same-day.js");

@@ -11,0 +11,0 @@ function isToday(date, timeZone) {

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

var _isSameDay = require("./is-same-day");
var _isSameDay = require("./is-same-day.js");

@@ -11,0 +11,0 @@ function isTomorrow(date, timeZone) {

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

var _isSameDay = require("./is-same-day");
var _isSameDay = require("./is-same-day.js");

@@ -11,0 +11,0 @@ function isYesterday(date, timeZone) {

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

var _deprecatedTimezones = require("./deprecated-timezones");
var _deprecatedTimezones = require("./deprecated-timezones.js");

@@ -11,0 +11,0 @@ function mapDeprecatedTimezones(timezone) {

@@ -8,5 +8,5 @@ "use strict";

var _applyTimeZoneOffset = require("./apply-time-zone-offset");
var _applyTimeZoneOffset = require("./apply-time-zone-offset.js");
var _parseDateStringParts = require("./parse-date-string-parts");
var _parseDateStringParts = require("./parse-date-string-parts.js");

@@ -13,0 +13,0 @@ function parseDateString(dateString, timeZone) {

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

var _getTimeZoneOffset = require("./get-time-zone-offset");
var _getTimeZoneOffset = require("./get-time-zone-offset.js");

@@ -11,0 +11,0 @@ function unapplyTimeZoneOffset(date, timeZone1, timeZone2) {

@@ -25,4 +25,4 @@ "use strict";

var _formatDate = require("./formatDate");
var _formatDate = require("./formatDate.js");
var _timezone = require("./timezone");
var _timezone = require("./timezone.js");

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

var _formatDate = require("./formatDate");
var _formatDate = require("./formatDate.js");

@@ -11,0 +11,0 @@ function getIanaTimeZone(locale, options) {

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

var _getTimeZoneOffset = require("./get-time-zone-offset");
var _getTimeZoneOffset = require("./get-time-zone-offset.js");

@@ -11,0 +11,0 @@ function applyTimeZoneOffset(date, timeZone1, timeZone2) {

@@ -10,5 +10,5 @@ "use strict";

var _utilities = require("./utilities");
var _index = require("./utilities/index.js");
var _sanitiseDateString = require("./sanitise-date-string");
var _sanitiseDateString = require("./sanitise-date-string.js");

@@ -82,3 +82,3 @@ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class;

const yearString = (0, _utilities.formatDate)(date, 'en', {
const yearString = (0, _index.formatDate)(date, 'en', {
timeZone,

@@ -98,3 +98,3 @@ year: 'numeric'

static getMonth(date, timeZone) {
const monthString = (0, _utilities.formatDate)(date, 'en', {
const monthString = (0, _index.formatDate)(date, 'en', {
timeZone,

@@ -114,3 +114,3 @@ month: 'numeric'

static getDay(date, timeZone) {
const dayString = (0, _utilities.formatDate)(date, 'en', {
const dayString = (0, _index.formatDate)(date, 'en', {
timeZone,

@@ -130,3 +130,3 @@ day: 'numeric'

static getWeekday(date, timeZone) {
const weekdayString = (0, _utilities.formatDate)(date, 'en', {
const weekdayString = (0, _index.formatDate)(date, 'en', {
timeZone,

@@ -140,3 +140,3 @@ weekday: 'long'

static getHour(date, timeZone) {
const hourString = (0, _utilities.formatDate)(date, 'en', {
const hourString = (0, _index.formatDate)(date, 'en', {
timeZone,

@@ -156,3 +156,3 @@ hour12: false,

static getMinute(date, timeZone) {
const minuteString = (0, _utilities.formatDate)(date, 'en', {
const minuteString = (0, _index.formatDate)(date, 'en', {
timeZone,

@@ -171,3 +171,3 @@ minute: 'numeric'

static getSecond(date, timeZone) {
const secondString = (0, _utilities.formatDate)(date, 'en', {
const secondString = (0, _index.formatDate)(date, 'en', {
timeZone,

@@ -186,3 +186,3 @@ second: 'numeric'

static getTimePartsFallback(date, timeZone) {
const timeString = (0, _utilities.formatDate)(date, 'en', {
const timeString = (0, _index.formatDate)(date, 'en', {
timeZone,

@@ -189,0 +189,0 @@ hour12: false,

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

var _getDateTimeParts = require("./get-date-time-parts");
var _getDateTimeParts = require("./get-date-time-parts.js");

@@ -11,0 +11,0 @@ function getTimeZoneOffset(date = new Date(), timeZone1, timeZone2) {

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

var _applyTimeZoneOffset = require("./apply-time-zone-offset");
var _applyTimeZoneOffset = require("./apply-time-zone-offset.js");

@@ -20,5 +20,5 @@ Object.keys(_applyTimeZoneOffset).forEach(function (key) {

var _constants = require("./constants");
var _index = require("./constants/index.js");
Object.keys(_constants).forEach(function (key) {
Object.keys(_index).forEach(function (key) {
if (key === "default" || key === "__esModule") return;

@@ -28,3 +28,3 @@ Object.defineProperty(exports, key, {

get: function () {
return _constants[key];
return _index[key];
}

@@ -34,3 +34,3 @@ });

var _getDateTimeParts = require("./get-date-time-parts");
var _getDateTimeParts = require("./get-date-time-parts.js");

@@ -47,3 +47,3 @@ Object.keys(_getDateTimeParts).forEach(function (key) {

var _getTimeZoneOffset = require("./get-time-zone-offset");
var _getTimeZoneOffset = require("./get-time-zone-offset.js");

@@ -60,3 +60,3 @@ Object.keys(_getTimeZoneOffset).forEach(function (key) {

var _isFutureDate = require("./is-future-date");
var _isFutureDate = require("./is-future-date.js");

@@ -73,3 +73,3 @@ Object.keys(_isFutureDate).forEach(function (key) {

var _isLessThanOneDayAgo = require("./is-less-than-one-day-ago");
var _isLessThanOneDayAgo = require("./is-less-than-one-day-ago.js");

@@ -86,3 +86,3 @@ Object.keys(_isLessThanOneDayAgo).forEach(function (key) {

var _isLessThanOneHourAgo = require("./is-less-than-one-hour-ago");
var _isLessThanOneHourAgo = require("./is-less-than-one-hour-ago.js");

@@ -99,3 +99,3 @@ Object.keys(_isLessThanOneHourAgo).forEach(function (key) {

var _isLessThanOneMinuteAgo = require("./is-less-than-one-minute-ago");
var _isLessThanOneMinuteAgo = require("./is-less-than-one-minute-ago.js");

@@ -112,3 +112,3 @@ Object.keys(_isLessThanOneMinuteAgo).forEach(function (key) {

var _isLessThanOneWeekAgo = require("./is-less-than-one-week-ago");
var _isLessThanOneWeekAgo = require("./is-less-than-one-week-ago.js");

@@ -125,3 +125,3 @@ Object.keys(_isLessThanOneWeekAgo).forEach(function (key) {

var _isLessThanOneWeekAway = require("./is-less-than-one-week-away");
var _isLessThanOneWeekAway = require("./is-less-than-one-week-away.js");

@@ -138,3 +138,3 @@ Object.keys(_isLessThanOneWeekAway).forEach(function (key) {

var _isLessThanOneYearAgo = require("./is-less-than-one-year-ago");
var _isLessThanOneYearAgo = require("./is-less-than-one-year-ago.js");

@@ -151,3 +151,3 @@ Object.keys(_isLessThanOneYearAgo).forEach(function (key) {

var _isLessThanOneYearAway = require("./is-less-than-one-year-away");
var _isLessThanOneYearAway = require("./is-less-than-one-year-away.js");

@@ -164,3 +164,3 @@ Object.keys(_isLessThanOneYearAway).forEach(function (key) {

var _isSameDay = require("./is-same-day");
var _isSameDay = require("./is-same-day.js");

@@ -177,3 +177,3 @@ Object.keys(_isSameDay).forEach(function (key) {

var _isSameMonth = require("./is-same-month");
var _isSameMonth = require("./is-same-month.js");

@@ -190,3 +190,3 @@ Object.keys(_isSameMonth).forEach(function (key) {

var _isSameYear = require("./is-same-year");
var _isSameYear = require("./is-same-year.js");

@@ -203,3 +203,3 @@ Object.keys(_isSameYear).forEach(function (key) {

var _isToday = require("./is-today");
var _isToday = require("./is-today.js");

@@ -216,3 +216,3 @@ Object.keys(_isToday).forEach(function (key) {

var _isYesterday = require("./is-yesterday");
var _isYesterday = require("./is-yesterday.js");

@@ -229,3 +229,3 @@ Object.keys(_isYesterday).forEach(function (key) {

var _isTomorrow = require("./is-tomorrow");
var _isTomorrow = require("./is-tomorrow.js");

@@ -242,3 +242,3 @@ Object.keys(_isTomorrow).forEach(function (key) {

var _parseDateString = require("./parse-date-string");
var _parseDateString = require("./parse-date-string.js");

@@ -255,3 +255,3 @@ Object.keys(_parseDateString).forEach(function (key) {

var _parseDateStringParts = require("./parse-date-string-parts");
var _parseDateStringParts = require("./parse-date-string-parts.js");

@@ -268,3 +268,3 @@ Object.keys(_parseDateStringParts).forEach(function (key) {

var _sanitiseDateString = require("./sanitise-date-string");
var _sanitiseDateString = require("./sanitise-date-string.js");

@@ -281,3 +281,3 @@ Object.keys(_sanitiseDateString).forEach(function (key) {

var _unapplyTimeZoneOffset = require("./unapply-time-zone-offset");
var _unapplyTimeZoneOffset = require("./unapply-time-zone-offset.js");

@@ -294,3 +294,3 @@ Object.keys(_unapplyTimeZoneOffset).forEach(function (key) {

var _mapDeprecatedTimezones = require("./map-deprecated-timezones");
var _mapDeprecatedTimezones = require("./map-deprecated-timezones.js");

@@ -307,5 +307,5 @@ Object.keys(_mapDeprecatedTimezones).forEach(function (key) {

var _utilities = require("./utilities");
var _index2 = require("./utilities/index.js");
Object.keys(_utilities).forEach(function (key) {
Object.keys(_index2).forEach(function (key) {
if (key === "default" || key === "__esModule") return;

@@ -315,5 +315,5 @@ Object.defineProperty(exports, key, {

get: function () {
return _utilities[key];
return _index2[key];
}
});
});

@@ -8,8 +8,8 @@ "use strict";

var _isFutureDate = require("./is-future-date");
var _isFutureDate = require("./is-future-date.js");
var _constants = require("./constants");
var _index = require("./constants/index.js");
function isLessThanOneDayAgo(date, now = new Date()) {
return !(0, _isFutureDate.isFutureDate)(date, now) && now.getTime() - date.getTime() < _constants.TimeUnit.Day;
return !(0, _isFutureDate.isFutureDate)(date, now) && now.getTime() - date.getTime() < _index.TimeUnit.Day;
}

@@ -8,8 +8,8 @@ "use strict";

var _isFutureDate = require("./is-future-date");
var _isFutureDate = require("./is-future-date.js");
var _constants = require("./constants");
var _index = require("./constants/index.js");
function isLessThanOneHourAgo(date, now = new Date()) {
return !(0, _isFutureDate.isFutureDate)(date, now) && now.getTime() - date.getTime() < _constants.TimeUnit.Hour;
return !(0, _isFutureDate.isFutureDate)(date, now) && now.getTime() - date.getTime() < _index.TimeUnit.Hour;
}

@@ -8,8 +8,8 @@ "use strict";

var _isFutureDate = require("./is-future-date");
var _isFutureDate = require("./is-future-date.js");
var _constants = require("./constants");
var _index = require("./constants/index.js");
function isLessThanOneMinuteAgo(date, now = new Date()) {
return !(0, _isFutureDate.isFutureDate)(date, now) && now.getTime() - date.getTime() < _constants.TimeUnit.Minute;
return !(0, _isFutureDate.isFutureDate)(date, now) && now.getTime() - date.getTime() < _index.TimeUnit.Minute;
}

@@ -8,8 +8,8 @@ "use strict";

var _isFutureDate = require("./is-future-date");
var _isFutureDate = require("./is-future-date.js");
var _constants = require("./constants");
var _index = require("./constants/index.js");
function isLessThanOneWeekAgo(date, now = new Date()) {
return !(0, _isFutureDate.isFutureDate)(date, now) && now.getTime() - date.getTime() < _constants.TimeUnit.Week;
return !(0, _isFutureDate.isFutureDate)(date, now) && now.getTime() - date.getTime() < _index.TimeUnit.Week;
}

@@ -8,8 +8,8 @@ "use strict";

var _isFutureDate = require("./is-future-date");
var _isFutureDate = require("./is-future-date.js");
var _constants = require("./constants");
var _index = require("./constants/index.js");
function isLessThanOneWeekAway(date, now = new Date()) {
return (0, _isFutureDate.isFutureDate)(date, now) && date.getTime() - now.getTime() < _constants.TimeUnit.Week;
return (0, _isFutureDate.isFutureDate)(date, now) && date.getTime() - now.getTime() < _index.TimeUnit.Week;
}

@@ -8,8 +8,8 @@ "use strict";

var _isFutureDate = require("./is-future-date");
var _isFutureDate = require("./is-future-date.js");
var _constants = require("./constants");
var _index = require("./constants/index.js");
function isLessThanOneYearAgo(date, now = new Date()) {
return !(0, _isFutureDate.isFutureDate)(date, now) && now.getTime() - date.getTime() < _constants.TimeUnit.Year;
return !(0, _isFutureDate.isFutureDate)(date, now) && now.getTime() - date.getTime() < _index.TimeUnit.Year;
}

@@ -8,8 +8,8 @@ "use strict";

var _isFutureDate = require("./is-future-date");
var _isFutureDate = require("./is-future-date.js");
var _constants = require("./constants");
var _index = require("./constants/index.js");
function isLessThanOneYearAway(date, now = new Date()) {
return (0, _isFutureDate.isFutureDate)(date, now) && date.getTime() - now.getTime() < _constants.TimeUnit.Year;
return (0, _isFutureDate.isFutureDate)(date, now) && date.getTime() - now.getTime() < _index.TimeUnit.Year;
}

@@ -8,5 +8,5 @@ "use strict";

var _getDateTimeParts = require("./get-date-time-parts");
var _getDateTimeParts = require("./get-date-time-parts.js");
var _isSameMonth = require("./is-same-month");
var _isSameMonth = require("./is-same-month.js");

@@ -13,0 +13,0 @@ function isSameDay(date1, date2, timeZone) {

@@ -8,5 +8,5 @@ "use strict";

var _getDateTimeParts = require("./get-date-time-parts");
var _getDateTimeParts = require("./get-date-time-parts.js");
var _isSameYear = require("./is-same-year");
var _isSameYear = require("./is-same-year.js");

@@ -13,0 +13,0 @@ function isSameMonth(date1, date2, timeZone) {

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

var _getDateTimeParts = require("./get-date-time-parts");
var _getDateTimeParts = require("./get-date-time-parts.js");

@@ -11,0 +11,0 @@ function isSameYear(date1, date2, timeZone) {

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

var _isSameDay = require("./is-same-day");
var _isSameDay = require("./is-same-day.js");

@@ -11,0 +11,0 @@ function isToday(date, timeZone) {

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

var _isSameDay = require("./is-same-day");
var _isSameDay = require("./is-same-day.js");

@@ -11,0 +11,0 @@ function isTomorrow(date, timeZone) {

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

var _isSameDay = require("./is-same-day");
var _isSameDay = require("./is-same-day.js");

@@ -11,0 +11,0 @@ function isYesterday(date, timeZone) {

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

var _deprecatedTimezones = require("./deprecated-timezones");
var _deprecatedTimezones = require("./deprecated-timezones.js");

@@ -11,0 +11,0 @@ function mapDeprecatedTimezones(timezone) {

@@ -8,5 +8,5 @@ "use strict";

var _applyTimeZoneOffset = require("./apply-time-zone-offset");
var _applyTimeZoneOffset = require("./apply-time-zone-offset.js");
var _parseDateStringParts = require("./parse-date-string-parts");
var _parseDateStringParts = require("./parse-date-string-parts.js");

@@ -13,0 +13,0 @@ function parseDateString(dateString, timeZone) {

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

var _getTimeZoneOffset = require("./get-time-zone-offset");
var _getTimeZoneOffset = require("./get-time-zone-offset.js");

@@ -11,0 +11,0 @@ function unapplyTimeZoneOffset(date, timeZone1, timeZone2) {

@@ -25,4 +25,4 @@ "use strict";

var _formatDate = require("./formatDate");
var _formatDate = require("./formatDate.js");
var _timezone = require("./timezone");
var _timezone = require("./timezone.js");

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

var _formatDate = require("./formatDate");
var _formatDate = require("./formatDate.js");

@@ -11,0 +11,0 @@ function getIanaTimeZone(locale, options) {

@@ -8,2 +8,8 @@ # Changelog

## [0.5.3] - 2021-03-03
### Fixed
- Updated multi-build outputs to include mandatory extensions to fix "Module not found" issues reported by ESM supported bundlers [#1759](https://github.com/Shopify/quilt/pull/1759)
## [0.5.0] - 2020-12-18

@@ -10,0 +16,0 @@

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

module.exports = require("./build/cjs/index");
module.exports = require("./build/cjs/index.js");
{
"name": "@shopify/dates",
"version": "0.5.2",
"version": "0.5.3",
"license": "MIT",

@@ -27,7 +27,7 @@ "description": "Lightweight date operations library",

"dependencies": {
"@shopify/decorators": "^1.2.1",
"@shopify/decorators": "^1.2.2",
"tslib": "^1.14.1"
},
"devDependencies": {
"@shopify/jest-dom-mocks": "^2.11.1"
"@shopify/jest-dom-mocks": "^2.11.2"
},

@@ -34,0 +34,0 @@ "files": [

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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