Sha256: 596c61089fe810d73fa799bd95c44c1d1f67dee40c8219b3f17dbad633ae1ad9

Contents?: true

Size: 368 Bytes

Versions: 19

Compression:

Stored size: 368 Bytes

Contents

# encoding: utf-8

module Nanoc3::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.gmtime.strftime("%Y-%m-%dT%H:%M:%SZ")
  end

end

class Time
  include Nanoc3::Extra::TimeExtensions
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
nanoc3-3.1.9 lib/nanoc3/extra/core_ext/time.rb
nanoc3-3.1.8 lib/nanoc3/extra/core_ext/time.rb
nanoc3-3.1.7 lib/nanoc3/extra/core_ext/time.rb
nanoc3-3.1.6 lib/nanoc3/extra/core_ext/time.rb
nanoc3-3.2.0a3 lib/nanoc3/extra/core_ext/time.rb
nanoc3-3.1.5 lib/nanoc3/extra/core_ext/time.rb
nanoc3-3.1.4 lib/nanoc3/extra/core_ext/time.rb
nanoc3-3.2.0a2 lib/nanoc3/extra/core_ext/time.rb
nanoc3-3.1.3 lib/nanoc3/extra/core_ext/time.rb
nanoc3-3.2.0a1 lib/nanoc3/extra/core_ext/time.rb
nanoc3-3.1.2 lib/nanoc3/extra/core_ext/time.rb
nanoc3-3.1.1 lib/nanoc3/extra/core_ext/time.rb
nanoc3-3.1.0 lib/nanoc3/extra/core_ext/time.rb
nanoc3-3.1.0rc1 lib/nanoc3/extra/core_ext/time.rb
nanoc3-3.1.0b2 lib/nanoc3/extra/core_ext/time.rb
nanoc3-3.1.0b1 lib/nanoc3/extra/core_ext/time.rb
nanoc3-3.1.0a3 lib/nanoc3/extra/core_ext/time.rb
nanoc3-3.1.0a2 lib/nanoc3/extra/core_ext/time.rb
nanoc3-3.1.0a1 lib/nanoc3/extra/core_ext/time.rb