@date-io/date-fns
Advanced tools
Comparing version 2.6.0 to 2.6.1
@@ -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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37696