Module: Craig::Node::StartsAndEndsAt

Included in:
Listing::Community::Events
Defined in:
lib/craig/node.rb

Overview

If there is no date range, then ends_at == starts_at.

Instance Method Summary collapse

Instance Method Details

#ends_atDate

Returns:

  • (Date)


107
108
109
110
# File 'lib/craig/node.rb', line 107

def ends_at
  _, ends_at = itemdates
  Date.parse(ends_at)
end

#starts_atDate

Returns:

  • (Date)


101
102
103
104
# File 'lib/craig/node.rb', line 101

def starts_at
  starts_at, _ = itemdates
  Date.parse(starts_at)
end