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

@date-io/date-fns

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@date-io/date-fns - npm Package Compare versions

Comparing version 2.6.0 to 2.6.1

2

build/date-fns-utils.d.ts

@@ -7,3 +7,3 @@ import { IUtils, DateIOFormats } from "@date-io/core/IUtils";

formats: DateIOFormats;
constructor({ locale, formats }?: {
constructor({ locale, formats, }?: {
formats?: Partial<DateIOFormats>;

@@ -10,0 +10,0 @@ locale?: Locale;

@@ -60,3 +60,3 @@ import addDays from 'date-fns/addDays';

shortDate: "MMM d",
year: "yyyy"
year: "yyyy",
};

@@ -158,6 +158,6 @@ var DateFnsUtils = /** @class */ (function () {

DateFnsUtils.prototype.startOfWeek = function (value) {
return startOfWeek(value);
return startOfWeek(value, { locale: this.locale });
};
DateFnsUtils.prototype.endOfWeek = function (value) {
return endOfWeek(value);
return endOfWeek(value, { locale: this.locale });
};

@@ -257,3 +257,3 @@ DateFnsUtils.prototype.getYear = function (value) {

start: startOfWeek(now, { locale: this.locale }),
end: endOfWeek(now, { locale: this.locale })
end: endOfWeek(now, { locale: this.locale }),
}).map(function (day) { return _this.formatByString(day, "EEEEEE"); });

@@ -260,0 +260,0 @@ };

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

shortDate: "MMM d",
year: "yyyy"
year: "yyyy",
};

@@ -162,6 +162,6 @@ var DateFnsUtils = /** @class */ (function () {

DateFnsUtils.prototype.startOfWeek = function (value) {
return startOfWeek(value);
return startOfWeek(value, { locale: this.locale });
};
DateFnsUtils.prototype.endOfWeek = function (value) {
return endOfWeek(value);
return endOfWeek(value, { locale: this.locale });
};

@@ -261,3 +261,3 @@ DateFnsUtils.prototype.getYear = function (value) {

start: startOfWeek(now, { locale: this.locale }),
end: endOfWeek(now, { locale: this.locale })
end: endOfWeek(now, { locale: this.locale }),
}).map(function (day) { return _this.formatByString(day, "EEEEEE"); });

@@ -264,0 +264,0 @@ };

{
"name": "@date-io/date-fns",
"version": "2.6.0",
"version": "2.6.1",
"description": "Abstraction over common javascript date management libraries",

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

},
"gitHead": "d6db25c9863530a6d5934a2f8b97b1f0162d967d"
"gitHead": "8a3a46119cc1e21b69332811626cff62a77020a1"
}

@@ -63,3 +63,3 @@ import addDays from "date-fns/addDays";

shortDate: "MMM d",
year: "yyyy"
year: "yyyy",
};

@@ -73,3 +73,3 @@

locale,
formats
formats,
}: { formats?: Partial<DateIOFormats>; locale?: Locale } = {}) {

@@ -97,3 +97,3 @@ this.locale = locale;

.match(longFormatRegexp)
.map(token => {
.map((token) => {
const firstCharacter = token[0];

@@ -192,7 +192,7 @@ if (firstCharacter === "p" || firstCharacter === "P") {

public startOfWeek(value: Date) {
return startOfWeek(value);
return startOfWeek(value, { locale: this.locale });
}
public endOfWeek(value: Date) {
return endOfWeek(value);
return endOfWeek(value, { locale: this.locale });
}

@@ -323,4 +323,4 @@

start: startOfWeek(now, { locale: this.locale }),
end: endOfWeek(now, { locale: this.locale })
}).map(day => this.formatByString(day, "EEEEEE"));
end: endOfWeek(now, { locale: this.locale }),
}).map((day) => this.formatByString(day, "EEEEEE"));
}

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