Exclusive End date - AllDay events
Air Calendar is based on FullCalendar which uses exclusive end dates. Below is an explanation of what this means and how to set things up to work properly.
All end dates are exclusive. For example, if an all-day event ends on a Thursday, the end date will be 00:00:00 on Friday. An event with the end date of 2018-09-03will appear to span through the 2nd of the month, but will end before the start of the 3rd of the month.
This behavior is more consistent with other API’s and formats, such as iCalendar.
These threads (#1,#2) has a lot of discussion and useful information on why exclusive dates are used for end dates of All day events.
Yes I know this can be confusing for users. But remember computers understand things differently from humans. For example array indexes stars from 0 but humans count from 1. This means when dealing with arrays the indexes you display to your users will be different from what you use to perform your calculation. as a no-code platform makes life easy for its developer by counting from one but behind the scene counting starts from 0.
So how to I make sure my users don't get confuse?
Store end dates with exclusive times (most apps do this). Whenever you are about to display an all-day end date to the user, always subtract 1 day. Immediately after you accept an all-day end date input from the user, always add 1 before you store it.
You can for example use Bubble's conditional to check if the event is an all day event and if yes subtract 1 day using the bubble function +(days): -1
Example of displaying All Day event end date
When saving an All Day event, do the opposite by adding 1 day to the end date.
Copy link