@propriety/court-calendar 1.0.25 → 1.0.26

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/dist/index.mjs CHANGED
@@ -9820,7 +9820,10 @@ async function zw(t) {
9820
9820
  })).json();
9821
9821
  console.log("Fetched dates:", n);
9822
9822
  for (const r of n.dates)
9823
- r.Lifecycle || (r.Lifecycle = Gt.SCHEDULED), r.Type || (r.Type = Ft.UNKNOWN), r.MultipleDates = Array.isArray(r.MultipleDates) ? r.MultipleDates.map((i) => new Date(i)) : null;
9823
+ r.Lifecycle || (r.Lifecycle = Gt.SCHEDULED), r.Type || (r.Type = Ft.UNKNOWN), r.MultipleDates = Array.isArray(r.MultipleDates) ? r.MultipleDates.map((i) => {
9824
+ const [s, a, c] = i.split("T")[0].split("-").map(Number);
9825
+ return new Date(s, a - 1, c);
9826
+ }) : null;
9824
9827
  return n.dates || [];
9825
9828
  }
9826
9829
  async function pi(t, e, n, r, i) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@propriety/court-calendar",
3
3
  "private": false,
4
- "version": "1.0.25",
4
+ "version": "1.0.26",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "./dist/index.mjs",
@@ -21,7 +21,10 @@ export async function getAllDates(apiKey: string): Promise<Array<CourtDate>> {
21
21
  date.Type = HearingType.UNKNOWN;
22
22
  }
23
23
  date.MultipleDates = Array.isArray(date.MultipleDates)
24
- ? date.MultipleDates.map((d: string) => new Date(d))
24
+ ? date.MultipleDates.map((d: string) => {
25
+ const [year, month, day] = d.split('T')[0].split('-').map(Number);
26
+ return new Date(year, month - 1, day);
27
+ })
25
28
  : null;
26
29
  }
27
30