Class Weekdays
In: lib/more/facets/times.rb
Parent: Object

The Weekdays class provides useful weekday terminology to Numeric.

Methods

after   ago   before   from_now   new   since   until  

Constants

WEEKDAYS = 1..5
ONE_DAY = 60 * 60 * 24

Public Class methods

[Source]

# File lib/more/facets/times.rb, line 399
  def initialize(n)
    @n = n
  end

Public Instance methods

after(time = ::Time.now)

Alias for since

[Source]

# File lib/more/facets/times.rb, line 403
  def ago(time = ::Time.now)
    step :down, time
  end
before(time = ::Time.now)

Alias for ago

from_now(time = ::Time.now)

Alias for since

[Source]

# File lib/more/facets/times.rb, line 409
  def since(time = ::Time.now)
    step :up, time
  end
until(time = ::Time.now)

Alias for ago

[Validate]