@dvsa/appdev-api-common 0.4.3 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dvsa/appdev-api-common",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "keywords": ["dvsa", "nodejs", "typescript"],
5
5
  "author": "DVSA",
6
6
  "description": "Utils library for common API functionality",
@@ -17,6 +17,7 @@ export declare class DateTime {
17
17
  diff(targetDate: AcceptableDate, unit: dayjs.QUnitType, precise?: boolean): number;
18
18
  daysDiff(targetDate: AcceptableDate): number;
19
19
  compareDuration(targetDate: AcceptableDate, unit: dayjs.QUnitType): number;
20
+ isValid(): boolean;
20
21
  isBefore(targetDate: AcceptableDate): boolean;
21
22
  isAfter(targetDate: AcceptableDate): boolean;
22
23
  isBetween(startDate: AcceptableDate, endDate: AcceptableDate): boolean;
@@ -70,6 +70,9 @@ class DateTime {
70
70
  const date = new DateTime(targetDate);
71
71
  return date.instance.diff(this.instance, unit);
72
72
  }
73
+ isValid() {
74
+ return this.instance.isValid();
75
+ }
73
76
  isBefore(targetDate) {
74
77
  const date = new DateTime(targetDate);
75
78
  return this.instance.isBefore(date.instance);