Sha256: 375dcf06d77a9031f8d4079a836519f8b738826ec7b191a84fdd80f65762a4d0

Contents?: true

Size: 400 Bytes

Versions: 4

Compression:

Stored size: 400 Bytes

Contents

# encoding: utf-8

# @api private
module Nanoc::Extra::TimeExtensions
  # @return [String] The time in an ISO-8601 date format.
  def __nanoc_to_iso8601_date
    strftime('%Y-%m-%d')
  end

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

# @api private
class Time
  include Nanoc::Extra::TimeExtensions
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
nanoc-4.0.0b2 lib/nanoc/extra/core_ext/time.rb
nanoc-4.0.0b1 lib/nanoc/extra/core_ext/time.rb
nanoc-4.0.0a2 lib/nanoc/extra/core_ext/time.rb
nanoc-4.0.0a1 lib/nanoc/extra/core_ext/time.rb