@date-io/dayjs
Advanced tools
Comparing version 2.2.0 to 2.3.0
@@ -21,2 +21,3 @@ import defaultDayjs from "dayjs"; | ||
date(value?: any): defaultDayjs.Dayjs; | ||
toJsDate(value: Dayjs): Date; | ||
isValid(value: any): boolean; | ||
@@ -23,0 +24,0 @@ isNull(date: Dayjs): boolean; |
@@ -70,2 +70,5 @@ import defaultDayjs from 'dayjs'; | ||
}; | ||
DayjsUtils.prototype.toJsDate = function (value) { | ||
return value.toDate(); | ||
}; | ||
DayjsUtils.prototype.isValid = function (value) { | ||
@@ -72,0 +75,0 @@ return this.dayjs(value).isValid(); |
@@ -74,2 +74,5 @@ 'use strict'; | ||
}; | ||
DayjsUtils.prototype.toJsDate = function (value) { | ||
return value.toDate(); | ||
}; | ||
DayjsUtils.prototype.isValid = function (value) { | ||
@@ -76,0 +79,0 @@ return this.dayjs(value).isValid(); |
{ | ||
"name": "@date-io/dayjs", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"description": "Abstraction over common javascript date management libraries", | ||
@@ -12,3 +12,3 @@ "main": "build/index.js", | ||
"dependencies": { | ||
"@date-io/core": "^2.2.0" | ||
"@date-io/core": "^2.3.0" | ||
}, | ||
@@ -45,3 +45,3 @@ "devDependencies": { | ||
"license": "MIT", | ||
"gitHead": "fb544fcb8d281ae4642eb1677a3dc147d626c592" | ||
"gitHead": "9073e951057d018665cdc2facd75892914cfa9bc" | ||
} |
@@ -96,2 +96,6 @@ import defaultDayjs from "dayjs"; | ||
public toJsDate(value: Dayjs) { | ||
return value.toDate(); | ||
} | ||
public isValid(value: any) { | ||
@@ -98,0 +102,0 @@ return this.dayjs(value).isValid(); |
30459
799
Updated@date-io/core@^2.3.0