Class: DateTime
- Inherits:
-
Object
- Object
- DateTime
- Defined in:
- lib/auditing.rb
Instance Method Summary collapse
Instance Method Details
#show(format = nil) ⇒ Object
52 53 54 55 56 57 58 59 60 61 |
# File 'lib/auditing.rb', line 52 def show(format = nil) case format when :human strftime("%d-%m-%Y %H:%M") when :full strftime("%d-%m-%Y %H:%M:%S") else to_s end end |
#to_date ⇒ Object
48 49 50 |
# File 'lib/auditing.rb', line 48 def to_date Date.civil(self.year, self.mon, self.day) end |
#to_datetime ⇒ Object
44 45 46 |
# File 'lib/auditing.rb', line 44 def to_datetime self end |