Module: Nanoc3::Extra::TimeExtensions
- Included in:
- Time
- Defined in:
- lib/nanoc3/extra/core_ext/time.rb
Instance Method Summary collapse
-
#to_iso8601_date ⇒ String
The time in an ISO-8601 date format.
-
#to_iso8601_time ⇒ String
The time in an ISO-8601 time format.
Instance Method Details
#to_iso8601_date ⇒ String
Returns The time in an ISO-8601 date format.
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 ⇒ String
Returns The time in an ISO-8601 time format.
11 12 13 |
# File 'lib/nanoc3/extra/core_ext/time.rb', line 11 def to_iso8601_time self.getutc.strftime("%Y-%m-%dT%H:%M:%SZ") end |