Class: Numeric

Inherits:
Object
  • Object
show all
Includes:
When::TM::TemporalPosition::Conversion
Defined in:
lib/when_exe/core/duration.rb,
lib/when_exe/core/extension.rb

Overview

Extensions to Numeric class

Direct Known Subclasses

When::Coordinates::Pair

Instance Method Summary collapse

Methods included from When::TM::TemporalPosition::Conversion

#julian_date, #tm_position

Instance Method Details

#to_day_of_weekWhen::Coordinates::Residue Also known as: day_of_week

Note:

core/extension

曜日(剰余類)

Returns:



103
104
105
# File 'lib/when_exe/core/extension.rb', line 103

def to_day_of_week
  When::Coordinates::Residue.day_of_week(self)
end

#to_month_nameWhen::BasicTypes::M17n Also known as: month_name

Note:

core/extension

月名

self が 月番号の月名を返します

Returns:



117
118
119
# File 'lib/when_exe/core/extension.rb', line 117

def to_month_name
  When::BasicTypes::M17n.month_name(self)
end

#to_pair(branch = nil) ⇒ When::Coordinates::Pair Also known as: pair

self を幹の要素と解釈してWhen::Coordinates::Pair を生成



128
129
130
# File 'lib/when_exe/core/extension.rb', line 128

def to_pair(branch=nil)
  Coordinates::Pair._force_pair(self, branch)
end

#unit_durationWhen::TM::Duration

Note:

unit は second, minute, hour, day, week または seconds, minutes, hours, days, weeks に読み替える

Note:

core/duration

メソッド名に相当する単位で表した When::TM::Duration

Returns:



# File 'lib/when_exe/core/duration.rb', line 73

#unit_interval_lengthWhen::TM::IntervalLength

Note:

unit は second, minute, hour, day, week または seconds, minutes, hours, days, weeks に読み替える

Note:

core/extension

メソッド名に相当する単位で表した When::TM::IntervalLength



# File 'lib/when_exe/core/extension.rb', line 133

#unit_period_durationWhen::TM::PeriodDuration

Note:

unit は second, minute, hour, day, week, month, year または seconds, minutes, hours, days, weeks, months, years に読み替える

Note:

core/extension

メソッド名に相当する単位で表した When::TM::PeriodDuration



# File 'lib/when_exe/core/extension.rb', line 142