shelving 1.47.3 → 1.48.0

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
@@ -11,7 +11,7 @@
11
11
  "state-management",
12
12
  "query-builder"
13
13
  ],
14
- "version": "1.47.3",
14
+ "version": "1.48.0",
15
15
  "repository": "https://github.com/dhoulb/shelving",
16
16
  "author": "Dave Houlbrooke <dave@shax.com>",
17
17
  "license": "0BSD",
@@ -63,19 +63,19 @@
63
63
  "@types/jest": "^27.4.0",
64
64
  "@types/react": "^17.0.38",
65
65
  "@types/react-dom": "^17.0.11",
66
- "@typescript-eslint/eslint-plugin": "^5.9.0",
67
- "@typescript-eslint/parser": "^5.9.0",
68
- "eslint": "^8.6.0",
66
+ "@typescript-eslint/eslint-plugin": "^5.9.1",
67
+ "@typescript-eslint/parser": "^5.9.1",
68
+ "eslint": "^8.7.0",
69
69
  "eslint-config-prettier": "^8.3.0",
70
70
  "eslint-plugin-import": "^2.25.4",
71
71
  "eslint-plugin-prettier": "^4.0.0",
72
- "firebase": "^9.6.2",
72
+ "firebase": "^9.6.3",
73
73
  "jest": "^27.4.7",
74
74
  "jest-ts-webcompat-resolver": "^1.0.0",
75
75
  "prettier": "^2.5.1",
76
76
  "react": "^17.0.2",
77
77
  "react-dom": "^17.0.2",
78
- "ts-jest": "^27.1.2",
78
+ "ts-jest": "^27.1.3",
79
79
  "typescript": "^4.5.4"
80
80
  },
81
81
  "peerDependencies": {
package/util/date.d.ts CHANGED
@@ -128,3 +128,5 @@ export declare const formatDate: (date: PossibleDate) => string;
128
128
  export declare const isPast: (target: PossibleDate, current?: PossibleDate | undefined) => boolean;
129
129
  /** Is a date in the future? */
130
130
  export declare const isFuture: (target: PossibleDate, current?: PossibleDate | undefined) => boolean;
131
+ /** Is a date today (taking into account midnight). */
132
+ export declare const isToday: (target: PossibleDate, current?: PossibleDate | undefined) => boolean;
package/util/date.js CHANGED
@@ -217,3 +217,5 @@ const _formatter = new Intl.DateTimeFormat(undefined, {});
217
217
  export const isPast = (target, current) => getDate(target) < getDate(current);
218
218
  /** Is a date in the future? */
219
219
  export const isFuture = (target, current) => getDate(target) > getDate(current);
220
+ /** Is a date today (taking into account midnight). */
221
+ export const isToday = (target, current) => getMidnight(target) === getMidnight(current);