ACADOID® Apps — Calendar — Help

See the app page for videos and screenshots.

Terminology

Calendar consists of the following elements

Layers
Layers contain events and tasks; there are active layers (for which events and tasks are shown) and passive layers (for which events and tasks are hidden). Layers have a name and a color.
Click to edit, long-click for options, drag to the left/to the right to activate/deactivate, and drag to the top to discard (only empty or fully synchronized layers can be discarded).

Events
Events are items which are assigned to a specific period. Events have a name, a start and end time, they can have a recurrence frequency and a notification; you can assign locations, attendees, descriptions, and attachments to events.
Click to edit, long-click for options, drag up/down to reschedule, and drag to the top to discard.

Tasks
Tasks are items which are not assigned to a specific period. Tasks have a name; you can assign descriptions and attachments to tasks.
Click to edit, drag up/down to reorder, and drag to the top to discard.

Display

Layer icons

Synchronization (click to change, see below)
Color (click to change)
Number of events and next event (information only)
Next event is a recurrence
Number of tasks (information only)

Event icons

Layer (click to change)
Start time, end time, and duration (click to correct)
Time is in the past
Recurrence frequency and duration (click to change)
Time is in the past
Disable recurrence
Enable recurrence
Notifications (click to change, long-click to discard)
Time is in the past
Add notification
Location
Get directions
Attendees (click to send email, long-click to discard)
Add attendee
Description
Attachments (click to view, long-click to discard)
Add attachment

Task icons

Layer (click to change)
Description
Attachments
Add attachment

Usage

Action icons

Find in calendar
Synchronize layers
Synchronize layers (last attempt failed)
Synchronize layers (disabled)
Scroll and zoom to next event
Scroll and zoom to today

Floating action icons

Add layer
Add event
Add task
Paste event (instead of adding a new empty event)

Layer option icons

Scroll and zoom to next event of this layer

Event option icons

Move downward
Copy event
Cut event
Disable recurrence
Enable recurrence

Holidays and birthdays

Calendar has the main religious holidays of several denominations and the public holidays of several countries built-in. Additional ‘user-defined holidays’ can be defined in JavaScript. The built-in holidays are defined in JavaScript as well, this JavaScript code can be copied to the field for ‘user-defined holidays’ and modified.

Birthdays can be defined in JavaScript.

The usage of JavaScript allows holidays and birthdays that do not have a fixed date in the Gregorian calendar.

Definitions

Besides the standard JavaScript commands, the following additional ones are available:

(Number) Calendar.getYear() returns the year in Gregorian calendar for which holidays need to be determined
(Number) Calendar.getWeekday(Number month, Number day) returns the weekday (Sunday equals 1, Monday equals 2, ..., Saturday equals 7) for month month (1 to 12) and day (1 to 28, 29, 30, or 31, depending on month)
(Number) Calendar.getDayOfYear(Number month, Number day) returns the day of the year for month month (1 to 12) and day (1 to 28, 29, 30, or 31, depending on month)
(Number) Calendar.getMonth(Number dayOfYear) returns the month (January equals 1, ..., December equals 12) for day of year dayOfYear
(Number) Calendar.getDay(Number dayOfYear) returns the day (1 to 28, 29, 30, or 31, depending on month) for day of year dayOfYear
(Number) Calendar.addHoliday(Number month, Number day, String name, Boolean flag) adds a major (flag is true) or minor (flag is false) holiday with name name for month month (1 to 12) and day (1 to 28, 29, 30, or 31, depending on month); command only available for user-defined holidays
(Number) Calendar.addBirthday(Number month, Number day, String name) adds a birthday with name name for month month (1 to 12) and day (1 to 28, 29, 30, or 31, depending on month); command only available for birthdays

Note that that commenting has to be done using ‘/* comment */’ (commenting by ‘//’ does not work) and that your JavaScript code has to finish within 400 ms

Examples

A first simple example, add a major holiday ‘New year’ on January 1

Calendar.addHoliday(1, 1, "New year", true);   add a major holiday ‘New year’ on January 1

A second more complex example, add a birthday on February 29 for leap years and March 1 for non-leap years

days = Calendar.getDayOfYear(12, 31);   get the number of the last day of the year
if (days == 366) { leap year?
  Calendar.addBirthday(2, 29, "Bob"); add Bob's birthday for leap year
} else {
  Calendar.addBirthday(3, 1, "Bob"); add Bob's birthday one day later for non-leap years
}

A third more complex example, add a major holiday ‘Martin Luther King Day’ on third Monday in January

day = 3 * 7 - 6; minimal day of month for third occurrence of a weekday
weekday = Calendar.getWeekday(1, day); get weekday for day in January
while (weekday != 2) { while not Monday
  day++; next day
  weekday = Calendar.getWeekday(1, day); get weekday for day in January
} day is now third Monday in January
Calendar.addHoliday(1, day, "Martin Luther King Day", true);   add a major holiday ‘Martin Luther King Day’ on third Monday in January

A fourth more complex example, add moon phases as minor holidays (download code)

year = Calendar.getYear(); get year
days = Calendar.getDayOfYear(12, 31); get number of days in year
newMoon = new Date(1970, 0, 7, 20, 35, 0); known date of new moon
for (dayOfYear = 1; dayOfYear <= days; dayOfYear++) { for all days of this year
  month = Calendar.getMonth(dayOfYear); get month of day in year
  day = Calendar.getDay(dayOfYear); get day of day in year
  moon = new Date(year, month - 1, day, 20, 35, 0); get date for day in year
  diff = moon.getTime() - newMoon.getTime(); get difference
  phase = (diff / 1000) % 2551443; get moon phase
  switch (Math.floor(phase / (24 * 3600))) { get moon phase in range 0 to 29
  case 0: new moon
  case 1:
    Calendar.addHoliday(month, day, "\uD83C\uDF11", false);   add ‘new moon’ symbol
    dayOfYear += 5; skip five days
    break;
  case 7: increasing moon
  case 8:
    Calendar.addHoliday(month, day, "\uD83C\uDF12", false); add ‘increasing moon’ symbol
    dayOfYear += 5; skip five days
    break;
  case 15: full moon
  case 16:
    Calendar.addHoliday(month, day, "\uD83C\uDF15", false); add ‘full moon’ symbol
    dayOfYear += 5; skip five days
    break;
  case 22: decreasing moon
  case 23:
    Calendar.addHoliday(month, day, "\uD83C\uDF18", false); add ‘decreasing moon’ symbol
    dayOfYear += 5; skip five days
    break;
  }
}

Widgets

Calendar provides five different widgets

  1. a day widget which displays a day's view
  2. a week widget which displays a week's view
  3. a month widget which displays a month's view
  4. an events widget which displays the next events
  5. a tasks widget which displays the tasks
To place a widget, drag it from the ‘widgets’ section of your launcher configuration to the desired location on the launcher screen and scale it as desired. Widgets are only available on supporting devices.

Synchronization

device     internet    
   
synchronization synchronization
by Calendar by system
  Calendar calendar
database
cloud
calendar
 
 

Calendar does not upload your data to any cloud calendar, nor does it download any data to your device. ‘Synchronization’ in the description above means that Calendar writes events and tasks to and reads events and tasks from the calendar database on your device. Being able to do that requires Calendar to have the WRITE_CALENDAR/​READ_CALENDAR permission, see next section. Your data still remains on your device after Calendar performed this synchronization.

Whether or not the calendar database on your device is synchronized with a cloud calendar (and how the synchronization is performed) is determined by the system settings of your device.

The calendar database on your device consists of one or several parts, each uniquely identified by a user id (which is usually an email address). A layer of Calendar can either not be synchronized with any part of the calendar database (‘No synchronization’) or be synchronized with exactly one part of the calendar database identified by user id id (‘Synchronization with id’). Conversely, each part of the calendar database on your device can either not be synchronized with any layer of Calendar or can be synchronized with exactly one layer of Calendar. The synchronization property can only be chosen when creating a new layer and remains fixed afterwards until you discard the layer (in which case this part of the calendar database can be synchronized with a new layer).

Permissions

Calendar requests the following permissions