Class: Time
Overview
Definitions
Instance Method Summary collapse
-
#iso8601_for_idiots ⇒ String
‘#iso8601` with the `-` and `:` characters removed.
Instance Method Details
#iso8601_for_idiots ⇒ String
‘#iso8601` with the `-` and `:` characters removed. Intended to be more agreeable to a wider range of file systems and programs than the standard format, while still adhering to ISO 8601 (as far as I can tell) and acceptable to parse.
There is nothing tricky about this method; I just wanted to standardize a format for these situations. I hate reading date-times like this, but it seems like the best and safest approach :/
42 43 44 |
# File 'lib/nrser/core_ext/time.rb', line 42 def iso8601_for_idiots iso8601.gsub /\-\:/, '' end |