Skip to content

Commit 410885a

Browse files
Revert #128
1 parent 1ca0552 commit 410885a

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ Event::create()
197197
...
198198
```
199199

200+
Please notice that an end date according to the spec is always non inclusive. So an event that spans a full day on March 6th 2019 should have March 7th 2019 as end date. Your calendar application should handle this correctly and display the event on March 6th only.
201+
200202
The status of an event can be set:
201203

202204
``` php

src/Components/Event.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,9 @@ protected function resolveProperties(ComponentPayload $payload): self
260260
);
261261
}
262262

263-
if ($end = $this->resolveEnd()) {
263+
if ($this->ends) {
264264
$payload->property(
265-
DateTimeProperty::fromDateTime('DTEND', $end->getDateTime(), ! $this->isFullDay, $this->withTimezone)
265+
DateTimeProperty::fromDateTime('DTEND', $this->ends->getDateTime(), ! $this->isFullDay, $this->withTimezone)
266266
);
267267
}
268268

tests/IntegrationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
->uniqueIdentifier('uuid_2')
7272
->createdAt(new DateTime('6 March 2019 15:00:00'))
7373
->startsAt(new DateTime('6 March 2019'))
74-
->endsAt(new DateTime('6 March 2019'))
74+
->endsAt(new DateTime('7 March 2019'))
7575
)
7676
->get();
7777

@@ -86,7 +86,7 @@
8686
->uniqueIdentifier('uuid_2')
8787
->createdAt(new DateTime('6 March 2019 15:00:00'))
8888
->startsAt(new DateTime('6 March 2019'))
89-
->endsAt(new DateTime('6 March 2019'))
89+
->endsAt(new DateTime('7 March 2019'))
9090
->fullDay()
9191
)
9292
->get();

0 commit comments

Comments
 (0)