Class | XSD::XSDGMonthDay |
In: |
lib/xsd/datatypes.rb
|
Parent: | XSDAnySimpleType |
Type | = | QName.new(Namespace, GMonthDayLiteral) |
# File lib/xsd/datatypes.rb, line 797 797: def initialize(value = nil) 798: init(Type, value) 799: end
# File lib/xsd/datatypes.rb, line 814 814: def _to_s 815: s = format('%02d-%02d', @data.mon, @data.mday) 816: add_tz(s) 817: end
# File lib/xsd/datatypes.rb, line 803 803: def screen_data_str(t) 804: /^(\d\d)-(\d\d)(Z|(?:[+\-]\d\d:\d\d)?)?$/ =~ t.to_s.strip 805: unless Regexp.last_match 806: raise ValueSpaceError.new("#{ type }: cannot accept '#{ t }'.") 807: end 808: mon = $1.to_i 809: mday = $2.to_i 810: zonestr = $3 811: DateTime.civil(1, mon, mday, 0, 0, 0, tz2of(zonestr)) 812: end