@date-io/moment
Advanced tools
Comparing version 2.13.2 to 2.14.0
@@ -205,2 +205,8 @@ import defaultMoment from 'moment'; | ||
}; | ||
this.startOfYear = function (date) { | ||
return date.clone().startOf("year"); | ||
}; | ||
this.endOfYear = function (date) { | ||
return date.clone().endOf("year"); | ||
}; | ||
this.startOfMonth = function (date) { | ||
@@ -207,0 +213,0 @@ return date.clone().startOf("month"); |
@@ -211,2 +211,8 @@ 'use strict'; | ||
}; | ||
this.startOfYear = function (date) { | ||
return date.clone().startOf("year"); | ||
}; | ||
this.endOfYear = function (date) { | ||
return date.clone().endOf("year"); | ||
}; | ||
this.startOfMonth = function (date) { | ||
@@ -213,0 +219,0 @@ return date.clone().startOf("month"); |
@@ -57,2 +57,4 @@ import defaultMoment from "moment"; | ||
getMeridiemText: (ampm: "am" | "pm") => string; | ||
startOfYear: (date: Moment) => defaultMoment.Moment; | ||
endOfYear: (date: Moment) => defaultMoment.Moment; | ||
startOfMonth: (date: Moment) => defaultMoment.Moment; | ||
@@ -59,0 +61,0 @@ endOfMonth: (date: Moment) => defaultMoment.Moment; |
{ | ||
"name": "@date-io/moment", | ||
"version": "2.13.2", | ||
"version": "2.14.0", | ||
"description": "Abstraction over common javascript date management libraries", | ||
@@ -17,3 +17,3 @@ "main": "build/index.js", | ||
"dependencies": { | ||
"@date-io/core": "^2.13.2" | ||
"@date-io/core": "^2.14.0" | ||
}, | ||
@@ -49,3 +49,3 @@ "devDependencies": { | ||
"license": "MIT", | ||
"gitHead": "c83bcc817b3589b4fe0d031e065f9ccd36a4d4c1" | ||
"gitHead": "77f89b4859d228ed8f34c740e3defc78d52bdba1" | ||
} |
@@ -270,2 +270,10 @@ import defaultMoment, { LongDateFormatKey } from "moment"; | ||
public startOfYear = (date: Moment) => { | ||
return date.clone().startOf("year"); | ||
}; | ||
public endOfYear = (date: Moment) => { | ||
return date.clone().endOf("year"); | ||
}; | ||
public startOfMonth = (date: Moment) => { | ||
@@ -272,0 +280,0 @@ return date.clone().startOf("month"); |
38404
974
Updated@date-io/core@^2.14.0