Skip to content

Commit 5acafe1

Browse files
authored
Merge pull request #2 from ajwhite/mock-data
User availability mock schedules
2 parents 2df88a8 + e8b1c27 commit 5acafe1

File tree

4 files changed

+78
-31
lines changed

4 files changed

+78
-31
lines changed

challenges/2. User Availability/README.md

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,47 @@ The schedule is an array of events, which contain a `start` and `end` field.
77
```js
88
const userScheduleA = [
99
{
10+
"title": "Meeting A",
11+
"start": "2017-02-21T09:00:00-05:00",
12+
"end": "2017-02-21T10:00:00-05:00"
13+
},
14+
{
15+
"title": "Meeting B",
16+
"start": "2017-02-21T11:00:00-05:00",
17+
"end": "2017-02-21T12:00:00-05:00"
18+
},
19+
{
20+
"title": "Meeting C",
1021
"start": "2017-02-21T12:00:00-05:00",
11-
"end": "2017-02-21T12:30:00-05:00",
22+
"end": "2017-02-21T12:45:00-05:00"
1223
},
1324
{
25+
"title": "Meeting D",
1426
"start": "2017-02-21T14:00:00-05:00",
15-
"end": "2017-02-21T16:00:00-05:00"
27+
"end": "2017-02-21T15:30:00-05:00"
1628
}
1729
];
30+
1831
const userScheduleB = [
1932
{
20-
"start": "2017-02-21T12:00:00-05:00",
21-
"end": "2017-02-21T12:30:00-05:00",
33+
"title": "Meeting A",
34+
"start": "2017-02-21T09:00:00-05:00",
35+
"end": "2017-02-21T09:45:00-05:00"
36+
},
37+
{
38+
"title": "Meeting B",
39+
"start": "2017-02-21T10:00:00-05:00",
40+
"end": "2017-02-21T10:15:00-05:00"
41+
},
42+
{
43+
"title": "Meeting C",
44+
"start": "2017-02-21T11:00:00-05:00",
45+
"end": "2017-02-21T13:45:00-05:00"
2246
},
2347
{
48+
"title": "Meeting D",
2449
"start": "2017-02-21T14:00:00-05:00",
25-
"end": "2017-02-21T16:00:00-05:00"
50+
"end": "2017-02-21T14:30:00-05:00"
2651
}
2752
];
2853

@@ -41,14 +66,14 @@ const freeSlots = findCommonFreeTimes(
4166
* [
4267
* {
4368
* "start": "2017-02-21T08:00:00-05:00",
44-
* "end": "2017-02-21T12:00:00-05:00"
69+
* "end": "2017-02-21T09:00:00-05:00"
4570
* },
4671
* {
47-
* "start": "2017-02-21T12:30:00-05:00",
48-
* "end": "2017-02-21T14:00:00-05:00"
72+
* "start": "2017-02-21T10:15:00-05:00",
73+
* "end": "2017-02-21T11:00:00-05:00"
4974
* },
5075
* {
51-
* "start": "2017-02-21T16:00:00-05:00",
76+
* "start": "2017-02-21T15:30:00-05:00",
5277
* "end": "2017-02-21T18:00:00-05:00"
5378
* }
5479
* ]

challenges/2. User Availability/data.json

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[
2+
{
3+
"title": "Meeting A",
4+
"start": "2017-02-21T09:00:00-05:00",
5+
"end": "2017-02-21T10:00:00-05:00"
6+
},
7+
{
8+
"title": "Meeting B",
9+
"start": "2017-02-21T11:00:00-05:00",
10+
"end": "2017-02-21T12:00:00-05:00"
11+
},
12+
{
13+
"title": "Meeting C",
14+
"start": "2017-02-21T12:00:00-05:00",
15+
"end": "2017-02-21T12:45:00-05:00"
16+
},
17+
{
18+
"title": "Meeting D",
19+
"start": "2017-02-21T14:00:00-05:00",
20+
"end": "2017-02-21T15:30:00-05:00"
21+
}
22+
]
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[
2+
{
3+
"title": "Meeting A",
4+
"start": "2017-02-21T09:00:00-05:00",
5+
"end": "2017-02-21T09:45:00-05:00"
6+
},
7+
{
8+
"title": "Meeting B",
9+
"start": "2017-02-21T10:00:00-05:00",
10+
"end": "2017-02-21T10:15:00-05:00"
11+
},
12+
{
13+
"title": "Meeting C",
14+
"start": "2017-02-21T11:00:00-05:00",
15+
"end": "2017-02-21T13:45:00-05:00"
16+
},
17+
{
18+
"title": "Meeting D",
19+
"start": "2017-02-21T14:00:00-05:00",
20+
"end": "2017-02-21T14:30:00-05:00"
21+
}
22+
]

0 commit comments

Comments
 (0)