Module: TimeBoss::Calendar::Support::Translatable

Included in:
Unit
Defined in:
lib/timeboss/calendar/support/translatable.rb

Constant Summary collapse

PERIODS =
%w[day week month quarter half year]

Instance Method Summary collapse

Instance Method Details

#day(index = nil) ⇒ Array<Calendar::Day>?

Get the day this unit represents. Returns nil if no single day can be identified.

Returns:



# File 'lib/timeboss/calendar/support/translatable.rb', line 32

#daysArray<Calendar::Day>

Get a list of days that fall within this unit.

Returns:



# File 'lib/timeboss/calendar/support/translatable.rb', line 28

#half(index = nil) ⇒ Array<Calendar::Half>?

Get the half this unit represents. Returns nil if no single half can be identified.

Returns:



# File 'lib/timeboss/calendar/support/translatable.rb', line 76

#halvesArray<Calendar::Half>

Get a list of halves that fall within this unit.

Returns:



# File 'lib/timeboss/calendar/support/translatable.rb', line 72

#month(index = nil) ⇒ Array<Calendar::Month>?

Get the month this unit represents. Returns nil if no single month can be identified.

Returns:



# File 'lib/timeboss/calendar/support/translatable.rb', line 54

#monthsArray<Calendar::Month>

Get a list of months that fall within this unit.

Returns:



# File 'lib/timeboss/calendar/support/translatable.rb', line 50

#quarter(index = nil) ⇒ Array<Calendar::Quarter>?

Get the quarter this unit represents. Returns nil if no single quarter can be identified.

Returns:



# File 'lib/timeboss/calendar/support/translatable.rb', line 65

#quartersArray<Calendar::Quarter>

Get a list of quarters that fall within this unit.

Returns:



# File 'lib/timeboss/calendar/support/translatable.rb', line 61

#week(index = nil) ⇒ Array<Calendar::Week>?

Get the week this unit represents. Returns nil if no single week can be identified.

Returns:



# File 'lib/timeboss/calendar/support/translatable.rb', line 43

#weeksArray<Calendar::Week>

Get a list of weeks that fall within this unit.

Returns:



# File 'lib/timeboss/calendar/support/translatable.rb', line 39

#year(index = nil) ⇒ Array<Calendar::Year>?

Get the year this unit represents. Returns nil if no single year can be identified.

Returns:



# File 'lib/timeboss/calendar/support/translatable.rb', line 87

#yearsArray<Calendar::Year>

Get a list of years that fall within this unit.

Returns:



# File 'lib/timeboss/calendar/support/translatable.rb', line 83