Class: Date
- Inherits:
-
Object
- Object
- Date
- Defined in:
- lib/veritas/sql/generator/core_ext/date.rb
Overview
Extend Date with methods available in ruby 1.9
Constant Summary collapse
- ISO_8601_FORMAT =
'%F'.freeze
Instance Method Summary collapse
-
#iso8601 ⇒ #to_s
private
Return the Date in ISO8601 date format.
Instance Method Details
#iso8601 ⇒ #to_s
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
TODO:
Remove once backports adds this method
Return the Date in ISO8601 date format
15 16 17 18 |
# File 'lib/veritas/sql/generator/core_ext/date.rb', line 15 def iso8601 date = frozen? ? dup : self date.strftime(ISO_8601_FORMAT) end |