@date-io/dayjs
Advanced tools
Comparing version 2.3.0 to 2.4.0
@@ -52,2 +52,4 @@ import defaultDayjs from "dayjs"; | ||
endOfMonth(date: Dayjs): defaultDayjs.Dayjs; | ||
startOfWeek(date: Dayjs): defaultDayjs.Dayjs; | ||
endOfWeek(date: Dayjs): defaultDayjs.Dayjs; | ||
getNextMonth(date: Dayjs): defaultDayjs.Dayjs; | ||
@@ -54,0 +56,0 @@ getPreviousMonth(date: Dayjs): defaultDayjs.Dayjs; |
@@ -165,2 +165,8 @@ import defaultDayjs from 'dayjs'; | ||
}; | ||
DayjsUtils.prototype.startOfWeek = function (date) { | ||
return date.clone().startOf("week"); | ||
}; | ||
DayjsUtils.prototype.endOfWeek = function (date) { | ||
return date.clone().endOf("week"); | ||
}; | ||
DayjsUtils.prototype.getNextMonth = function (date) { | ||
@@ -167,0 +173,0 @@ return date.clone().add(1, "month"); |
@@ -169,2 +169,8 @@ 'use strict'; | ||
}; | ||
DayjsUtils.prototype.startOfWeek = function (date) { | ||
return date.clone().startOf("week"); | ||
}; | ||
DayjsUtils.prototype.endOfWeek = function (date) { | ||
return date.clone().endOf("week"); | ||
}; | ||
DayjsUtils.prototype.getNextMonth = function (date) { | ||
@@ -171,0 +177,0 @@ return date.clone().add(1, "month"); |
{ | ||
"name": "@date-io/dayjs", | ||
"version": "2.3.0", | ||
"version": "2.4.0", | ||
"description": "Abstraction over common javascript date management libraries", | ||
@@ -12,3 +12,3 @@ "main": "build/index.js", | ||
"dependencies": { | ||
"@date-io/core": "^2.3.0" | ||
"@date-io/core": "^2.4.0" | ||
}, | ||
@@ -45,3 +45,3 @@ "devDependencies": { | ||
"license": "MIT", | ||
"gitHead": "9073e951057d018665cdc2facd75892914cfa9bc" | ||
"gitHead": "d1b13999d15fce1c7b06d20654f1867ec6a7e096" | ||
} |
@@ -222,2 +222,10 @@ import defaultDayjs from "dayjs"; | ||
public startOfWeek(date: Dayjs) { | ||
return date.clone().startOf("week"); | ||
} | ||
public endOfWeek(date: Dayjs) { | ||
return date.clone().endOf("week"); | ||
} | ||
public getNextMonth(date: Dayjs) { | ||
@@ -224,0 +232,0 @@ return date.clone().add(1, "month"); |
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
31145
819
Updated@date-io/core@^2.4.0