@date-io/dayjs
Advanced tools
@@ -55,2 +55,4 @@ import defaultDayjs from "dayjs"; | ||
| getMonth: (date: Dayjs) => number; | ||
| getDate: (date: Dayjs) => number; | ||
| setDate: (date: Dayjs, count: number) => TDate; | ||
| getDaysInMonth: (date: Dayjs) => number; | ||
@@ -57,0 +59,0 @@ isSameDay: (date: Dayjs, comparing: Dayjs) => boolean; |
@@ -198,2 +198,8 @@ import defaultDayjs from 'dayjs'; | ||
| }; | ||
| this.getDate = function (date) { | ||
| return date.date(); | ||
| }; | ||
| this.setDate = function (date, count) { | ||
| return date.set("date", count); | ||
| }; | ||
| this.getDaysInMonth = function (date) { | ||
@@ -200,0 +206,0 @@ return date.daysInMonth(); |
+6
-0
@@ -207,2 +207,8 @@ 'use strict'; | ||
| }; | ||
| this.getDate = function (date) { | ||
| return date.date(); | ||
| }; | ||
| this.setDate = function (date, count) { | ||
| return date.set("date", count); | ||
| }; | ||
| this.getDaysInMonth = function (date) { | ||
@@ -209,0 +215,0 @@ return date.daysInMonth(); |
+3
-3
| { | ||
| "name": "@date-io/dayjs", | ||
| "version": "2.15.0", | ||
| "version": "2.16.0", | ||
| "description": "Abstraction over common javascript date management libraries", | ||
@@ -17,3 +17,3 @@ "main": "build/index.js", | ||
| "dependencies": { | ||
| "@date-io/core": "^2.15.0" | ||
| "@date-io/core": "^2.16.0" | ||
| }, | ||
@@ -50,3 +50,3 @@ "devDependencies": { | ||
| "license": "MIT", | ||
| "gitHead": "b39210ed1114bc2d03bb487b94e1e32b1c7a8a8b" | ||
| "gitHead": "e9eddac85299013881e8bf005f5030fdf46d4756" | ||
| } |
@@ -258,2 +258,10 @@ import defaultDayjs, { QUnitType } from "dayjs"; | ||
| public getDate = (date: Dayjs) => { | ||
| return date.date(); | ||
| }; | ||
| public setDate = (date: Dayjs, count: number) => { | ||
| return date.set("date", count) as TDate; | ||
| }; | ||
| public getDaysInMonth = (date: Dayjs) => { | ||
@@ -260,0 +268,0 @@ return date.daysInMonth(); |
40888
1.58%1046
1.95%Updated