Class: DateParser
- Inherits:
-
Object
- Object
- DateParser
- Defined in:
- lib/fresnel/date_parser.rb
Class Method Summary collapse
Class Method Details
.string(date) ⇒ Object
2 3 4 |
# File 'lib/fresnel/date_parser.rb', line 2 def self.string(date) Date.today==Date.parse(date) ? DateTime.parse(date).strftime("Today %H:%M") : DateTime.parse(date).strftime("%d-%m-%y %H:%M") end |