@date-io/moment
Advanced tools
Comparing version 2.3.0 to 2.4.0
@@ -154,2 +154,8 @@ import defaultMoment from 'moment'; | ||
}; | ||
MomentUtils.prototype.startOfWeek = function (date) { | ||
return date.clone().startOf("week"); | ||
}; | ||
MomentUtils.prototype.endOfWeek = function (date) { | ||
return date.clone().endOf("week"); | ||
}; | ||
MomentUtils.prototype.getNextMonth = function (date) { | ||
@@ -156,0 +162,0 @@ return date.clone().add(1, "month"); |
@@ -158,2 +158,8 @@ 'use strict'; | ||
}; | ||
MomentUtils.prototype.startOfWeek = function (date) { | ||
return date.clone().startOf("week"); | ||
}; | ||
MomentUtils.prototype.endOfWeek = function (date) { | ||
return date.clone().endOf("week"); | ||
}; | ||
MomentUtils.prototype.getNextMonth = function (date) { | ||
@@ -160,0 +166,0 @@ return date.clone().add(1, "month"); |
@@ -49,2 +49,4 @@ import defaultMoment from "moment"; | ||
endOfMonth(date: Moment): defaultMoment.Moment; | ||
startOfWeek(date: Moment): defaultMoment.Moment; | ||
endOfWeek(date: Moment): defaultMoment.Moment; | ||
getNextMonth(date: Moment): defaultMoment.Moment; | ||
@@ -51,0 +53,0 @@ getPreviousMonth(date: Moment): defaultMoment.Moment; |
{ | ||
"name": "@date-io/moment", | ||
"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" | ||
}, | ||
@@ -44,3 +44,3 @@ "devDependencies": { | ||
"license": "MIT", | ||
"gitHead": "9073e951057d018665cdc2facd75892914cfa9bc" | ||
"gitHead": "d1b13999d15fce1c7b06d20654f1867ec6a7e096" | ||
} |
@@ -208,2 +208,10 @@ import defaultMoment from "moment"; | ||
public startOfWeek(date: Moment) { | ||
return date.clone().startOf("week"); | ||
} | ||
public endOfWeek(date: Moment) { | ||
return date.clone().endOf("week"); | ||
} | ||
public getNextMonth(date: Moment) { | ||
@@ -210,0 +218,0 @@ return date.clone().add(1, "month"); |
28668
772
Updated@date-io/core@^2.4.0