# File lib/xsd/datatypes.rb, line 771 771: def _to_s 772: year = (@data.year > 0) ? @data.year : @data.year - 1 773: s = format('%.4d-%02d', year, @data.mon) 774: add_tz(s) 775: end
# File lib/xsd/datatypes.rb, line 757 757: def screen_data_str(t) 758: /^([+\-]?\d{4,})-(\d\d)(Z|(?:([+\-])(\d\d):(\d\d))?)?$/ =~ t.to_s.strip 759: unless Regexp.last_match 760: raise ValueSpaceError.new("#{ type }: cannot accept '#{ t }'.") 761: end 762: year = $1.to_i 763: if year < 0 764: year += 1 765: end 766: mon = $2.to_i 767: zonestr = $3 768: DateTime.civil(year, mon, 1, 0, 0, 0, tz2of(zonestr)) 769: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.