Skip to content

Commit 2baf296

Browse files
committed
fix: update all-day event date formats to ISO 8601
Modified start and end dates for all-day events across multiple mock files to ensure they conform to ISO 8601 format. This change addresses inconsistencies in date handling
1 parent 22d2146 commit 2baf296

File tree

7 files changed

+150
-149
lines changed

7 files changed

+150
-149
lines changed

packages/core/src/__mocks__/v1/events/events.22jan.ts

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -13,80 +13,80 @@ export const mockEventSetJan22 = [
1313
title: "Jan 1 2021",
1414
isAllDay: true,
1515
isSomeday: false,
16-
startDate: "2021-01-01",
17-
endDate: "2021-01-02",
16+
startDate: "2021-01-01T00:00:00+12:00",
17+
endDate: "2021-01-02T00:00:00+12:00",
1818
},
1919
{
2020
_id: "9upm",
2121
user: "user1",
2222
title: "Jan 1 2021 (times)",
2323
isAllDay: false,
2424
isSomeday: false,
25-
startDate: "2021-01-01T12:12:12-12:00",
26-
endDate: "2021-01-02T02:02:02-02:30",
25+
startDate: "2021-01-01T12:12:12+12:00",
26+
endDate: "2021-01-02T02:02:02+12:00",
2727
},
2828
{
2929
_id: "wuop",
3030
user: "user1",
3131
title: "Dec 31",
3232
isAllDay: true,
3333
isSomeday: false,
34-
startDate: "2021-12-31",
35-
endDate: "2022-01-01",
34+
startDate: "2021-12-31T00:00:00+12:00",
35+
endDate: "2022-01-01T00:00:00+12:00",
3636
},
3737
{
3838
_id: "ddim",
3939
user: "user1",
4040
title: "Dec 31 - Feb 2",
4141
isAllDay: true,
4242
isSomeday: false,
43-
startDate: "2021-12-31",
44-
endDate: "2022-02-03",
43+
startDate: "2021-12-31T00:00:00+12:00",
44+
endDate: "2022-02-03T00:00:00+12:00",
4545
},
4646
{
4747
_id: "dkk",
4848
user: "user1",
4949
title: "Dec 31 - Jan 1",
5050
isAllDay: true,
5151
isSomeday: false,
52-
startDate: "2021-12-31",
53-
endDate: "2022-01-02",
52+
startDate: "2021-12-31T00:00:00+12:00",
53+
endDate: "2022-01-02T00:00:00+12:00",
5454
},
5555
{
5656
_id: "foo",
5757
user: "user1",
5858
title: "Jan 1",
5959
isAllDay: true,
6060
isSomeday: false,
61-
startDate: "2022-01-01",
62-
endDate: "2022-01-02",
61+
startDate: "2022-01-01T00:00:00+12:00",
62+
endDate: "2022-01-02T00:00:00+12:00",
6363
},
6464
{
6565
_id: "zoo",
6666
user: "user1",
6767
title: "Jan 1 (times)",
6868
isAllDay: false,
6969
isSomeday: false,
70-
startDate: "2022-01-01T00:00:00+03:00",
71-
endDate: "2022-01-020T11:11:11+03:00",
70+
startDate: "2022-01-01T00:00:00+12:00",
71+
endDate: "2022-01-02T00:00:00+12:00",
7272
},
7373
{
7474
_id: "noo",
7575
user: "user1",
7676
title: "Jan 1 (UTC times)",
7777
isAllDay: false,
7878
isSomeday: false,
79-
startDate: "2022-01-01T00:11:00Z",
80-
endDate: "2022-01-02T00:12:00Z",
79+
startDate: "2022-01-01T00:11:00+12:00",
80+
endDate: "2022-01-02T00:12:00+12:00",
8181
},
8282
{
8383
_id: "moo",
8484
user: "user1",
8585
title: "Jan 1 - Jan 3",
8686
isAllDay: true,
8787
isSomeday: false,
88-
startDate: "2022-01-01",
89-
endDate: "2022-01-04",
88+
startDate: "2022-01-01T00:00:00+12:00",
89+
endDate: "2022-01-04T00:00:00+12:00",
9090
},
9191
{
9292
_id: "hoo",
@@ -103,97 +103,97 @@ export const mockEventSetJan22 = [
103103
title: "Jan 1 - Jan 21",
104104
isAllDay: true,
105105
isSomeday: false,
106-
startDate: "2022-01-01",
107-
endDate: "2022-01-22",
106+
startDate: "2022-01-01T00:00:00+12:00",
107+
endDate: "2022-01-22T00:00:00+12:00",
108108
},
109109
{
110110
_id: "20mi",
111111
user: "user1",
112112
title: "Jan 1 - Jan 21 (times)",
113113
isAllDay: false,
114114
isSomeday: false,
115-
startDate: "2022-01-01T00:00:00+06:00",
116-
endDate: "2022-01-21T12:30:00+06:00",
115+
startDate: "2022-01-01T00:00:00+12:00",
116+
endDate: "2022-01-21T12:30:00+12:00",
117117
},
118118
{
119119
_id: "92323asd",
120120
user: "user1",
121121
title: "Jan 1 - Apr 20",
122122
isAllDay: true,
123123
isSomeday: false,
124-
startDate: "2022-01-01",
125-
endDate: "2022-04-21",
124+
startDate: "2022-01-01T00:00:00+12:00",
125+
endDate: "2022-04-21T00:00:00+12:00",
126126
},
127127
{
128128
_id: "mnb",
129129
user: "user1",
130130
title: "Jan 1 - Apr 20 (times)",
131131
isAllDay: false,
132132
isSomeday: false,
133-
startDate: "2022-01-01T04:30:00-02:00",
134-
endDate: "2022-04-21T04:40:00-02:00",
133+
startDate: "2022-01-01T04:30:00+12:00",
134+
endDate: "2022-04-21T04:40:00+12:00",
135135
},
136136
{
137137
_id: "kimnh",
138138
user: "user1",
139139
title: "Jan 1 2022 - Jan 1 2023",
140140
isAllDay: true,
141141
isSomeday: false,
142-
startDate: "2022-01-01",
143-
endDate: "2023-01-02",
142+
startDate: "2022-01-01T00:00:00+12:00",
143+
endDate: "2023-01-02T00:00:00+12:00",
144144
},
145145
{
146146
_id: "929hs",
147147
user: "user1",
148148
title: "Jan 1 2022 - Jan 1 2023 (times)",
149149
isAllDay: false,
150150
isSomeday: false,
151-
startDate: "2022-01-01T04:30:00-02:00",
152-
endDate: "2023-01-01T04:40:00-02:00",
151+
startDate: "2022-01-01T04:30:00+12:00",
152+
endDate: "2023-01-01T04:40:00+12:00",
153153
},
154154
{
155155
_id: "bar",
156156
title: "Jan 2",
157157
user: "user1",
158158
isAllDay: true,
159159
isSomeday: false,
160-
startDate: "2022-01-02",
161-
endDate: "2022-01-03",
160+
startDate: "2022-01-02T00:00:00+12:00",
161+
endDate: "2022-01-03T00:00:00+12:00",
162162
},
163163
{
164164
_id: "buzz",
165165
user: "user1",
166166
isAllDay: true,
167167
isSomeday: false,
168168
title: "Jan 3",
169-
startDate: "2022-01-03",
170-
endDate: "2022-01-04",
169+
startDate: "2022-01-03T00:00:00+12:00",
170+
endDate: "2022-01-04T00:00:00+12:00",
171171
},
172172
{
173173
_id: "huzz",
174174
user: "user1",
175175
isAllDay: true,
176176
isSomeday: false,
177177
title: "Jan 3 - Feb 3",
178-
startDate: "2022-01-03",
179-
endDate: "2022-02-04",
178+
startDate: "2022-01-03T00:00:00+12:00",
179+
endDate: "2022-02-04T00:00:00+12:00",
180180
},
181181
{
182182
_id: "kup",
183183
user: "user1",
184184
title: "Jan 4",
185185
isAllDay: true,
186186
isSomeday: false,
187-
startDate: "2022-01-04",
188-
endDate: "2022-01-05",
187+
startDate: "2022-01-04T00:00:00+12:00",
188+
endDate: "2022-01-05T00:00:00+12:00",
189189
},
190190
{
191191
_id: "pmim",
192192
user: "user1",
193193
title: "Jan 1 2023",
194194
isAllDay: true,
195195
isSomeday: false,
196-
startDate: "2023-01-01",
197-
endDate: "2023-01-02",
196+
startDate: "2023-01-01T00:00:00+12:00",
197+
endDate: "2023-01-02T00:00:00+12:00",
198198
},
199199
];

packages/core/src/__mocks__/v1/events/events.22mar.ts

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,35 @@ const allDayEventsThatShouldMatch =
77
title: "Feb 22",
88
isAllDay: false,
99
isSomeday: false,
10-
startDate: "2022-02",
10+
startDate: "2022-02-22T00:00:00+12:00",
11+
endDate: "2022-02-22T00:00:00+12:00",
1112
},
1213
{
1314
_id: "623defc12807744e27c13616",
1415
user: "user1",
1516
title: "Feb 14 - Mar 8",
1617
isAllDay: true,
1718
isSomeday: false,
18-
startDate: "2022-02-14",
19-
endDate: "2022-03-08",
19+
startDate: "2022-02-14T00:00:00+12:00",
20+
endDate: "2022-03-08T00:00:00+12:00",
2021
},
2122
{
2223
_id: "623defc12807744e27c1361e",
2324
user: "user1",
2425
title: "Mar 8",
2526
isAllDay: true,
2627
isSomeday: false,
27-
startDate: "2022-03-08",
28-
endDate: "2022-03-09",
28+
startDate: "2022-03-08T00:00:00+12:00",
29+
endDate: "2022-03-09T00:00:00+12:00",
2930
},
3031
{
3132
_id: "623defc02807744e27c1353c",
3233
user: "user1",
3334
title: "Mar 10 - 12",
3435
isAllDay: true,
3536
isSomeday: false,
36-
startDate: "2022-03-10",
37-
endDate: "2022-03-13",
37+
startDate: "2022-03-10T00:00:00+12:00",
38+
endDate: "2022-03-13T00:00:00+12:00",
3839
priority: "work",
3940
},
4041
];
@@ -46,8 +47,8 @@ const allDayEventsThatShouldNotMatch = [
4647
title: "Feb 28 - Mar 5",
4748
isAllDay: true,
4849
isSomeday: false,
49-
startDate: "2022-02-28",
50-
endDate: "2022-03-05",
50+
startDate: "2022-02-28T00:00:00+12:00",
51+
endDate: "2022-03-05T00:00:00+12:00",
5152
priority: "work",
5253
},
5354
{
@@ -56,8 +57,8 @@ const allDayEventsThatShouldNotMatch = [
5657
title: "Mar 5",
5758
isAllDay: true,
5859
isSomeday: false,
59-
startDate: "2022-03-05",
60-
endDate: "2022-03-06",
60+
startDate: "2022-03-05T00:00:00+12:00",
61+
endDate: "2022-03-06T00:00:00+12:00",
6162
priority: "work",
6263
},
6364
{
@@ -66,8 +67,8 @@ const allDayEventsThatShouldNotMatch = [
6667
title: "Mar 13",
6768
isAllDay: true,
6869
isSomeday: false,
69-
startDate: "2022-03-13",
70-
endDate: "2022-03-14",
70+
startDate: "2022-03-13T00:00:00+12:00",
71+
endDate: "2022-03-14T00:00:00+12:00",
7172
priority: "work",
7273
},
7374
{
@@ -76,8 +77,8 @@ const allDayEventsThatShouldNotMatch = [
7677
title: "Mar 13 - 16",
7778
isAllDay: true,
7879
isSomeday: false,
79-
startDate: "2022-03-13",
80-
endDate: "2022-03-17",
80+
startDate: "2022-03-13T00:00:00+12:00",
81+
endDate: "2022-03-17T00:00:00+12:00",
8182
priority: "work",
8283
},
8384
];

0 commit comments

Comments
 (0)