Sha256: 3298871b4835812ae81123481c0f8cd600cd2c80a767c3784c1d086460d1c226

Contents?: true

Size: 366 Bytes

Versions: 23

Compression:

Stored size: 366 Bytes

Contents

# encoding: utf-8

module Nanoc::Extra::TimeExtensions

  # @return [String] The time in an ISO-8601 date format.
  def to_iso8601_date
    self.strftime("%Y-%m-%d")
  end

  # @return [String] The time in an ISO-8601 time format.
  def to_iso8601_time
    self.getutc.strftime("%Y-%m-%dT%H:%M:%SZ")
  end

end

class Time
  include Nanoc::Extra::TimeExtensions
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
nanoc-3.6.7 lib/nanoc/extra/core_ext/time.rb
nanoc-3.6.6 lib/nanoc/extra/core_ext/time.rb
nanoc-3.6.5 lib/nanoc/extra/core_ext/time.rb
nanoc-3.6.4 lib/nanoc/extra/core_ext/time.rb
nanoc-3.6.3 lib/nanoc/extra/core_ext/time.rb
nanoc-3.6.2 lib/nanoc/extra/core_ext/time.rb
nanoc-3.6.1 lib/nanoc/extra/core_ext/time.rb
nanoc-3.6.0 lib/nanoc/extra/core_ext/time.rb
nanoc-3.5.0 lib/nanoc/extra/core_ext/time.rb
nanoc-3.5.0b2 lib/nanoc/extra/core_ext/time.rb
nanoc-3.5.0b1 lib/nanoc/extra/core_ext/time.rb
nanoc-3.4.3 lib/nanoc/extra/core_ext/time.rb
nanoc-3.4.2 lib/nanoc/extra/core_ext/time.rb
nanoc-3.4.1 lib/nanoc/extra/core_ext/time.rb
nanoc-3.4.0 lib/nanoc/extra/core_ext/time.rb
nanoc-3.3.7 lib/nanoc/extra/core_ext/time.rb
nanoc-3.3.6 lib/nanoc/extra/core_ext/time.rb
nanoc-3.3.5 lib/nanoc/extra/core_ext/time.rb
nanoc-3.3.4 lib/nanoc/extra/core_ext/time.rb
nanoc-3.3.3 lib/nanoc/extra/core_ext/time.rb