Module: Doing::ItemDates

Included in:
Item
Defined in:
lib/doing/item/dates.rb

Instance Method Summary collapse

Instance Method Details

#calculate_end_date(opt) ⇒ Object

#durationObject

If the entry doesn't have a @done date, return the elapsed time

#end_dateTime

Get the value of the item's @done tag

Returns:

  • (Time)

    @done value

#expand_date_tags(additional_tags = nil) ⇒ Object

Updates the title of the Item by expanding natural language dates within configured date tags (tags whose value is expected to be a date)

Parameters:

  • additional_tags (defaults to: nil)

    An array of additional tag names to consider dates

#intervalObject

Get the difference between the item's start date and the value of its @done tag (if present)

Returns:

  • Interval in seconds

#overlapping_time?(item_b) ⇒ Boolean

Test if the interval between start date and @done value overlaps with another item's

Parameters:

  • item_b (Item)

    The item to compare

Returns:

  • (Boolean)

    overlaps?

#same_time?(item_b) ⇒ Boolean

Test if two items occur at the same time (same start date and equal duration)

Parameters:

  • item_b (Item)

    The item to compare

Returns:

  • (Boolean)

    is equal?