Class: Time
Overview
Date helpers
Instance Method Summary collapse
- 
  
    
      #good?  ⇒ Boolean 
    
    
  
  
  
  
  
  
  
  
  
    Tests if object is nil. 
- 
  
    
      #humanize(seconds)  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    Format seconds as a natural language string. 
- 
  
    
      #relative_date  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    Format time as a relative date. 
- 
  
    
      #time_ago  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    Format date as "X hours ago". 
Instance Method Details
#good? ⇒ Boolean
Tests if object is nil
#humanize(seconds) ⇒ String
Format seconds as a natural language string
#relative_date ⇒ String
Format time as a relative date. Dates from today get just a time, from the last week get a time and day, from the last year get a month/day/time, and older entries get month/day/year/time
#time_ago ⇒ String
Format date as "X hours ago"