class Crystime::Item

Defined in:

crystime/item.cr

Instance Method Summary

Instance Method Detail


[View source]
def due=(due : Array(Crystime::VirtualTime | Time)) #

[View source]
def due_on?(target, list = @due) #

Checks if item is due on any of its date and time specifications.


[View source]
def due_on_date?(target, list = @due) #

Checks if item is due on any of its date specifications (without times).


[View source]
def due_on_time?(target, list = @due) #

Checks if item is due on any of its time specifications (without dates).


[View source]

[View source]
def omit=(omit : Array(Crystime::VirtualTime | Time)) #

[View source]
def omit_on?(target) #

Checks if item is omitted on any of its date and time specifications.


[View source]
def omit_on_date?(target) #

Checks if item is omitted on any of its date specifications (without times).


[View source]
def omit_on_time?(target) #

Checks if item is omitted on any of its time specifications (without dates).


[View source]
def omit_shift : Bool | Crystime::Span | Time::Span | Nil #

[View source]
def omit_shift=(omit_shift : Bool | Crystime::Span | Time::Span | Nil) #

[View source]
def on?(date = VirtualTime.local, max_before = nil, max_after = max_before, max_shifts = 1000) #

Checks whether the item is "on" on the specified date/time. Item is considered "on" if it matches at least one "due" time and does not match any "omit" time. If it matches an omit time, then depending on the value of omit_shift it may still be "on", or attempted to be rescheduled. Return values are: nil - item is not "on" / not "due" true - item is "on" (it is "due" and not on "omit" list) false - item is due, but that date is omitted, and no reschedule was requested or possible, so effectively it is not "on" Time::Span - span which is to be added to asked date to reach the earliestclosest time when item is "on"


[View source]

[View source]
def shift=(shift : Array(Crystime::VirtualTime | Time)) #

[View source]
def start : Crystime::VirtualTime | Time | Nil #

[View source]
def start=(start : Crystime::VirtualTime | Time | Nil) #

[View source]
def stop : Crystime::VirtualTime | Time | Nil #

[View source]
def stop=(stop : Crystime::VirtualTime | Time | Nil) #

[View source]