Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calendar #8

Closed
LisiLisenok opened this issue Apr 19, 2017 · 1 comment
Closed

Calendar #8

LisiLisenok opened this issue Apr 19, 2017 · 1 comment

Comments

@LisiLisenok
Copy link
Owner

LisiLisenok commented Apr 19, 2017

Calendar somehow provides bounding timer fire date/time.

@LisiLisenok
Copy link
Owner Author

Calendar interface

Calendar contains two methods:

  • verify if date-time is included to the calendar;
  • get nearest out of the calendar date-time (relative to the given date-time).

Calendar management

Calendar is set at scheduler or timer level. There are four cases for this:

  1. Combining with 'logical or'.
  2. Combining with 'logical and'.
  3. Ignore scheduler calendar and apply only timer one.
  4. Ignore timer calendar and apply only scheduler one.

Fire

If date-time timer to be fire is within calendar then one of the following is choosen depending on the given option:

  1. The fire time is simply ignored and next date-time is selected according to timer.
  2. The fire time is shifted to the nearest out of calendar date-time and timer is restarted from this date-time.

Types of calendars:

  • Daily, defines day time, for example from 8 to 23.
  • Weekly, defines week days, for example Sartuday and Sunday.
  • Monthly, defines days of month, like 1, 2, 3, etc up to 31.
  • Annual, defines a list of dates, like 1 Jan.
  • Last weekday of month, like last Friday of the month.
  • Weekday of the month, like the third Friday of the month.
  • Combination with 'logical or'.
  • Combination with 'logical and'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant