Method: Bwkfanboy::BH#date
- Defined in:
- lib/bwkfanboy/plugin.rb
#date(t) ⇒ Object
Tries to parse s string as a date. Return the result in ISO 8601 format.
18 19 20 21 22 |
# File 'lib/bwkfanboy/plugin.rb', line 18 def date(t) DateTime.parse(BH.clean(t)).iso8601 rescue DateTime.now.iso8601 end |