Class: DateTime
- Inherits:
-
Object
- Object
- DateTime
- Defined in:
- lib/rcap/extensions/date_time.rb
Instance Method Summary collapse
- #blank? ⇒ Boolean
-
#to_s_for_cap ⇒ String
Returns a string representaion of the time suitable for CAP.
Instance Method Details
#blank? ⇒ Boolean
13 14 15 |
# File 'lib/rcap/extensions/date_time.rb', line 13 def blank? false end |
#to_s_for_cap ⇒ String
Returns a string representaion of the time suitable for CAP.
8 9 10 11 |
# File 'lib/rcap/extensions/date_time.rb', line 8 def to_s_for_cap t = strftime(RCAP::RCAP_TIME_FORMAT) + format(RCAP::RCAP_ZONE_FORMAT, utc_hours_offset) t.sub(/\+(00:\d\d)$/, '-\1') end |