Class: TimeBoss::Calendar::Support::HasIsoWeeks::Week

Inherits:
Week
  • Object
show all
Defined in:
lib/timeboss/calendar/support/has_iso_weeks.rb

Constant Summary

Constants inherited from Unit

Unit::UnsupportedUnitError

Constants included from Translatable

Translatable::PERIODS

Instance Attribute Summary

Attributes inherited from Unit

#calendar, #end_date, #start_date

Instance Method Summary collapse

Methods inherited from Week

#initialize, #name, #title, #to_s, #year_index

Methods inherited from Unit

#+, #-, #==, #current?, #dates, #format, #initialize, #inspect, #offset, #thru, #to_range, type

Methods included from Clampable

#clamp

Methods included from Shiftable

#days_ago, #days_ahead, #halves_ago, #halves_ahead, #in_day, #in_half, #in_month, #in_quarter, #in_week, #in_year, #last_day, #last_half, #last_month, #last_quarter, #last_week, #last_year, #months_ago, #months_ahead, #next_day, #next_half, #next_month, #next_quarter, #next_week, #next_year, #quarters_ago, #quarters_ahead, #this_day, #this_half, #this_month, #this_quarter, #this_week, #this_year, #weeks_ago, #weeks_ahead, #years_ago, #years_ahead

Methods included from Translatable

#day, #days, #half, #halves, #month, #months, #quarter, #quarters, #week, #weeks, #years

Methods included from Navigable

#ago, #ahead, #next, #previous, #until

Constructor Details

This class inherits a constructor from TimeBoss::Calendar::Week

Instance Method Details

#indexObject



19
20
21
# File 'lib/timeboss/calendar/support/has_iso_weeks.rb', line 19

def index
  start_date.cweek
end

#yearObject



23
24
25
# File 'lib/timeboss/calendar/support/has_iso_weeks.rb', line 23

def year
  calendar.year(start_date.cwyear)
end