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_pos

Instance Method Details

#clockWhen::Parts::Timezone::Base Also known as: to_clock

Note:

core/extension

self を秒数とみなして When::Parts::Timezone::Base を取得



155
156
157
# File 'lib/when_exe/core/extension.rb', line 155

def clock
  When.Clock(self)
end

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

Note:

core/extension

曜日(剰余類)

Returns:



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

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:



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

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 を生成



143
144
145
# File 'lib/when_exe/core/extension.rb', line 143

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 110

#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 160

#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 169