Sha256: eddfb261a29d81ca3e37c8dd664c8d4a823678f1ba60aef78d9258e13276fa1b

Contents?: true

Size: 391 Bytes

Versions: 4

Compression:

Stored size: 391 Bytes

Contents

# encoding: utf-8

# Extend Date with methods available in ruby 1.9
class Date

  ISO_8601_FORMAT = '%F'.freeze

  # Return the Date in ISO8601 date format
  #
  # @return [#to_s]
  #
  # @todo Remove once backports adds this method
  #
  # @api private
  def iso8601
    date = frozen? ? dup : self
    date.strftime(ISO_8601_FORMAT)
  end unless method_defined? :iso8601

end # class Date

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
veritas-sql-generator-0.0.7 lib/veritas/sql/generator/core_ext/date.rb
veritas-sql-generator-0.0.6 lib/veritas/sql/generator/core_ext/date.rb
veritas-sql-generator-0.0.5 lib/veritas/sql/generator/core_ext/date.rb
veritas-sql-generator-0.0.4 lib/veritas/sql/generator/core_ext/date.rb