class XSD::XSDGMonthDay
Constants
- Type
Public Class Methods
new(value = nil)
click to toggle source
# File lib/xsd/datatypes.rb, line 812 def initialize(value = nil) init(Type, value) end
Private Instance Methods
_to_s()
click to toggle source
# File lib/xsd/datatypes.rb, line 829 def _to_s s = format('%02d-%02d', @data.mon, @data.mday) add_tz(s) end
screen_data_str(t)
click to toggle source
# File lib/xsd/datatypes.rb, line 818 def screen_data_str(t) /^(\d\d)-(\d\d)(Z|(?:[+\-]\d\d:\d\d)?)?$/ =~ t.to_s.strip unless Regexp.last_match raise ValueSpaceError.new("#{ type }: cannot accept '#{ t }'.") end mon = $1.to_i mday = $2.to_i zonestr = $3 DateTime.civil(1, mon, mday, 0, 0, 0, tz2of(zonestr)) end