Class: Date

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 Date class

Instance Method Summary collapse

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

#julian_date, #tm_position

Instance Method Details

#+(other) ⇒ Object



39
40
41
# File 'lib/when_exe/core/duration.rb', line 39

def +(other)
  other.kind_of?(When::TM::Duration) ? self + other.rational_duration : self._plus_(other)
end

#-(other) ⇒ Object



45
46
47
# File 'lib/when_exe/core/duration.rb', line 45

def -(other)
  other.kind_of?(When::TM::Duration) ? self - other.rational_duration : self._minus_(other)
end

#_minus_Object



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

alias :_minus_ :-

#_plus_Object



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

alias :_plus_  :+