@date-io/moment
Advanced tools
Comparing version 1.3.12 to 1.3.13
@@ -99,2 +99,11 @@ import defaultMoment from 'moment'; | ||
}; | ||
MomentUtils.prototype.isSameMonth = function (date, comparing) { | ||
return date.isSame(comparing, "month"); | ||
}; | ||
MomentUtils.prototype.isSameYear = function (date, comparing) { | ||
return date.isSame(comparing, "year"); | ||
}; | ||
MomentUtils.prototype.isSameHour = function (date, comparing) { | ||
return date.isSame(comparing, "hour"); | ||
}; | ||
MomentUtils.prototype.setMonth = function (date, count) { | ||
@@ -101,0 +110,0 @@ return date.clone().month(count); |
@@ -103,2 +103,11 @@ 'use strict'; | ||
}; | ||
MomentUtils.prototype.isSameMonth = function (date, comparing) { | ||
return date.isSame(comparing, "month"); | ||
}; | ||
MomentUtils.prototype.isSameYear = function (date, comparing) { | ||
return date.isSame(comparing, "year"); | ||
}; | ||
MomentUtils.prototype.isSameHour = function (date, comparing) { | ||
return date.isSame(comparing, "hour"); | ||
}; | ||
MomentUtils.prototype.setMonth = function (date, count) { | ||
@@ -105,0 +114,0 @@ return date.clone().month(count); |
@@ -45,2 +45,5 @@ import defaultMoment from "moment"; | ||
isSameDay(date: Moment, comparing: Moment): boolean; | ||
isSameMonth(date: Moment, comparing: Moment): boolean; | ||
isSameYear(date: Moment, comparing: Moment): boolean; | ||
isSameHour(date: Moment, comparing: Moment): boolean; | ||
setMonth(date: Moment, count: number): defaultMoment.Moment; | ||
@@ -47,0 +50,0 @@ getMeridiemText(ampm: "am" | "pm"): "AM" | "PM"; |
{ | ||
"name": "@date-io/moment", | ||
"version": "1.3.12", | ||
"version": "1.3.13", | ||
"description": "Abstraction over common javascript date management libraries", | ||
@@ -12,3 +12,3 @@ "main": "build/index.js", | ||
"dependencies": { | ||
"@date-io/core": "^1.3.12" | ||
"@date-io/core": "^1.3.13" | ||
}, | ||
@@ -44,3 +44,3 @@ "devDependencies": { | ||
"license": "MIT", | ||
"gitHead": "f47f6e02f69e81af8139ae1d8ab5354cebc8cdcc" | ||
"gitHead": "d105764c36b2021cde1fbcddd5445fed582a511c" | ||
} |
@@ -147,2 +147,14 @@ import defaultMoment from "moment"; | ||
public isSameMonth(date: Moment, comparing: Moment) { | ||
return date.isSame(comparing, "month"); | ||
} | ||
public isSameYear(date: Moment, comparing: Moment) { | ||
return date.isSame(comparing, "year"); | ||
} | ||
public isSameHour(date: Moment, comparing: Moment) { | ||
return date.isSame(comparing, "hour"); | ||
} | ||
public setMonth(date: Moment, count: number) { | ||
@@ -149,0 +161,0 @@ return date.clone().month(count); |
28299
744
Updated@date-io/core@^1.3.13