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

@date-io/moment

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@date-io/moment - npm Package Compare versions

Comparing version 2.16.0 to 2.16.1

10

build/index.esm.js

@@ -38,3 +38,3 @@ import defaultMoment from 'moment';

this.is12HourCycleInCurrentLocale = function () {
return /A|a/.test(_this.moment().localeData().longDateFormat("LT"));
return /A|a/.test(_this.moment.localeData(_this.getCurrentLocaleCode()).longDateFormat("LT"));
};

@@ -49,3 +49,5 @@ this.getFormatHelperText = function (format) {

if (firstCharacter === "L" || firstCharacter === ";") {
return _this.moment.localeData().longDateFormat(token);
return _this.moment
.localeData(_this.getCurrentLocaleCode())
.longDateFormat(token);
}

@@ -208,3 +210,5 @@ return token;

// AM/PM translation only possible in those who have 12 hour cycle in locale.
return _this.moment.localeData().meridiem(ampm === "am" ? 0 : 13, 0, false);
return _this.moment
.localeData(_this.getCurrentLocaleCode())
.meridiem(ampm === "am" ? 0 : 13, 0, false);
}

@@ -211,0 +215,0 @@ return ampm === "am" ? "AM" : "PM"; // fallback for de, ru, ...etc

@@ -44,3 +44,3 @@ 'use strict';

this.is12HourCycleInCurrentLocale = function () {
return /A|a/.test(_this.moment().localeData().longDateFormat("LT"));
return /A|a/.test(_this.moment.localeData(_this.getCurrentLocaleCode()).longDateFormat("LT"));
};

@@ -55,3 +55,5 @@ this.getFormatHelperText = function (format) {

if (firstCharacter === "L" || firstCharacter === ";") {
return _this.moment.localeData().longDateFormat(token);
return _this.moment
.localeData(_this.getCurrentLocaleCode())
.longDateFormat(token);
}

@@ -214,3 +216,5 @@ return token;

// AM/PM translation only possible in those who have 12 hour cycle in locale.
return _this.moment.localeData().meridiem(ampm === "am" ? 0 : 13, 0, false);
return _this.moment
.localeData(_this.getCurrentLocaleCode())
.meridiem(ampm === "am" ? 0 : 13, 0, false);
}

@@ -217,0 +221,0 @@ return ampm === "am" ? "AM" : "PM"; // fallback for de, ru, ...etc

{
"name": "@date-io/moment",
"version": "2.16.0",
"version": "2.16.1",
"description": "Abstraction over common javascript date management libraries",

@@ -48,3 +48,3 @@ "main": "build/index.js",

"license": "MIT",
"gitHead": "e9eddac85299013881e8bf005f5030fdf46d4756"
"gitHead": "6c16bac1b2ad5d8630c481383d7f575519ef47db"
}

@@ -55,3 +55,5 @@ import defaultMoment, { LongDateFormatKey } from "moment";

public is12HourCycleInCurrentLocale = () => {
return /A|a/.test(this.moment().localeData().longDateFormat("LT"));
return /A|a/.test(
this.moment.localeData(this.getCurrentLocaleCode()).longDateFormat("LT")
);
};

@@ -67,3 +69,5 @@

if (firstCharacter === "L" || firstCharacter === ";") {
return this.moment.localeData().longDateFormat(token as LongDateFormatKey);
return this.moment
.localeData(this.getCurrentLocaleCode())
.longDateFormat(token as LongDateFormatKey);
}

@@ -272,3 +276,5 @@

// AM/PM translation only possible in those who have 12 hour cycle in locale.
return this.moment.localeData().meridiem(ampm === "am" ? 0 : 13, 0, false);
return this.moment
.localeData(this.getCurrentLocaleCode())
.meridiem(ampm === "am" ? 0 : 13, 0, false);
}

@@ -275,0 +281,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