Class: Integer

Inherits:
Object
  • Object
show all
Defined in:
lib/clir/data_manager/Periode.rb

Instance Method Summary collapse

Instance Method Details

#daysObject Also known as: day



360
361
362
# File 'lib/clir/data_manager/Periode.rb', line 360

def days
  self * 24 * 3600
end

#proche?(laps) ⇒ Boolean

Retourne true si le nombre (de secondes correspondant à une durée) est ± une demi-heure

Returns:

  • (Boolean)


357
358
359
# File 'lib/clir/data_manager/Periode.rb', line 357

def proche?(laps)
  self.between?(laps - 1800, laps + 1800) 
end