Module: Nanoc3::Extra::TimeExtensions

encoding: utf-8

Public Visibility

Public Instance Method Summary

#to_iso8601_date

Returns a string with the time in an ISO-8601 date format.

#to_iso8601_time

Returns a string with the time in an ISO-8601 time format.

Public Instance Method Details

to_iso8601_date

public to_iso8601_date

Returns a string with the time in an ISO-8601 date format.

[View source]


6
7
8
# File 'lib/nanoc3/extra/core_ext/time.rb', line 6

def to_iso8601_date
  self.strftime("%Y-%m-%d")
end

to_iso8601_time

public to_iso8601_time

Returns a string with the time in an ISO-8601 time format.

[View source]


11
12
13
# File 'lib/nanoc3/extra/core_ext/time.rb', line 11

def to_iso8601_time
  self.gmtime.strftime("%Y-%m-%dT%H:%M:%SZ")
end
Generated on Sunday, August 09 2009 at 01:43:09 PM by YARD 0.2.3.2 (ruby-1.8.7).