Class: TimeBoss::Calendar::Quarter
- Inherits:
-
Support::MonthlyUnit
- Object
- Support::Unit
- Support::MonthlyUnit
- TimeBoss::Calendar::Quarter
- Defined in:
- lib/timeboss/calendar/quarter.rb
Constant Summary collapse
- NUM_MONTHS =
3
Constants inherited from Support::Unit
Support::Unit::UnsupportedUnitError
Constants included from Support::Translatable
Support::Translatable::PERIODS
Instance Attribute Summary
Attributes inherited from Support::MonthlyUnit
Attributes inherited from Support::Unit
#calendar, #end_date, #start_date
Instance Method Summary collapse
-
#name ⇒ String
Get a simple representation of this quarter.
-
#title ⇒ String
Get a “pretty” representation of this quarter.
Methods inherited from Support::MonthlyUnit
Methods inherited from Support::Unit
#+, #-, #==, #current?, #dates, #format, #initialize, #inspect, #offset, #thru, #to_range, type
Methods included from Support::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 Support::Translatable
#day, #days, #half, #halves, #month, #months, #quarter, #quarters, #week, #weeks, #year, #years
Methods included from Support::Navigable
#ago, #ahead, #next, #previous, #until
Constructor Details
This class inherits a constructor from TimeBoss::Calendar::Support::MonthlyUnit
Instance Method Details
#name ⇒ String
Get a simple representation of this quarter.
12 13 14 |
# File 'lib/timeboss/calendar/quarter.rb', line 12 def name "#{year_index}Q#{index}" end |
#title ⇒ String
Get a “pretty” representation of this quarter.
18 19 20 |
# File 'lib/timeboss/calendar/quarter.rb', line 18 def title "Q#{index} #{year_index}" end |