Module: Nanoc::Extra::TimeExtensions
- Included in:
- Time
- Defined in:
- lib/nanoc/extra/core_ext/time.rb
Instance Method Summary (collapse)
-
- (String) to_iso8601_date
The time in an ISO-8601 date format.
-
- (String) to_iso8601_time
The time in an ISO-8601 time format.
Instance Method Details
- (String) to_iso8601_date
Returns The time in an ISO-8601 date format.
6 7 8 |
# File 'lib/nanoc/extra/core_ext/time.rb', line 6 def to_iso8601_date strftime('%Y-%m-%d') end |
- (String) to_iso8601_time
Returns The time in an ISO-8601 time format.
11 12 13 |
# File 'lib/nanoc/extra/core_ext/time.rb', line 11 def to_iso8601_time getutc.strftime('%Y-%m-%dT%H:%M:%SZ') end |