Class Time
In: lib/icalendar/conversions.rb
Parent: Object

Methods

to_ical  

Public Instance methods

[Source]

     # File lib/icalendar/conversions.rb, line 109
109:   def to_ical(utc = false)
110:     # Double digit hour
111:     s << "0" unless self.hour > 9 
112:     s << self.hour.to_s
113:     
114:     # Double digit minute
115:     s << "0" unless self.min > 9 
116:     s << self.min.to_s
117:     
118:     # Double digit second
119:     s << "0" unless self.sec > 9 
120:     s << self.sec.to_s
121: 
122:     # UTC time gets a Z suffix
123:     if utc
124:       s << "Z"
125:     end
126:   end

[Validate]