Flowdock
method

_to_s

Importance_0
v1_8_7_330 - Show latest stable - 0 notes - Class: XSD::XSDDuration
_to_s() private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/xsd/datatypes.rb, line 468
  def _to_s
    str = ''
    str << @sign if @sign
    str << 'P'
    l = ''
    l << "#{ @year }Y" if @year.nonzero?
    l << "#{ @month }M" if @month.nonzero?
    l << "#{ @day }D" if @day.nonzero?
    r = ''
    r << "#{ @hour }H" if @hour.nonzero?
    r << "#{ @min }M" if @min.nonzero?
    r << "#{ @sec }S" if @sec.nonzero?
    str << l
    if l.empty?
      str << "0D"
    end
    unless r.empty?
      str << "T" << r
    end
    str
  end
Register or log in to add new notes.