# File lib/xsd/datatypes.rb, line 740 740: def _to_s 741: year = (@data.year > 0) ? @data.year : @data.year - 1 742: s = format('%.4d-%02d-%02d', year, @data.mon, @data.mday) 743: add_tz(s) 744: end
# File lib/xsd/datatypes.rb, line 725 725: def screen_data_str(t) 726: /^([+\-]?\d{4,})-(\d\d)-(\d\d)(Z|(?:([+\-])(\d\d):(\d\d))?)?$/ =~ t.to_s.strip 727: unless Regexp.last_match 728: raise ValueSpaceError.new("#{ type }: cannot accept '#{ t }'.") 729: end 730: year = $1.to_i 731: if year < 0 732: year += 1 733: end 734: mon = $2.to_i 735: mday = $3.to_i 736: zonestr = $4 737: DateTime.civil(year, mon, mday, 0, 0, 0, tz2of(zonestr)) 738: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.