Class: DateTime

Inherits:
Object
  • Object
show all
Defined in:
lib/sinatra/extensions/date_time.rb

Instance Method Summary collapse

Instance Method Details

#displayObject



4
5
6
# File 'lib/sinatra/extensions/date_time.rb', line 4

def display
  "#{Configuration::DAYS[self.wday]} #{self.day} de #{Configuration::MONTHS[self.month-1]} #{self.year == Date.today.year ? '' : self.year}"
end

#short_displayObject



8
9
10
# File 'lib/sinatra/extensions/date_time.rb', line 8

def short_display
  self.strftime('%-d/%-m/%Y')
end