Class XSD::XSDGDay
In: lib/xsd/datatypes.rb
Parent: XSDAnySimpleType

Methods

_to_s   new   screen_data_str  

Included Modules

XSDDateTimeImpl

Constants

Type = QName.new(Namespace, GDayLiteral)

Public Class methods

[Source]

     # File lib/xsd/datatypes.rb, line 824
824:   def initialize(value = nil)
825:     init(Type, value)
826:   end

Private Instance methods

[Source]

     # File lib/xsd/datatypes.rb, line 840
840:   def _to_s
841:     s = format('%02d', @data.mday)
842:     add_tz(s)
843:   end

[Source]

     # File lib/xsd/datatypes.rb, line 830
830:   def screen_data_str(t)
831:     /^(\d\d)(Z|(?:[+\-]\d\d:\d\d)?)?$/ =~ t.to_s.strip
832:     unless Regexp.last_match
833:       raise ValueSpaceError.new("#{ type }: cannot accept '#{ t }'.")
834:     end
835:     mday = $1.to_i
836:     zonestr = $2
837:     DateTime.civil(1, 1, mday, 0, 0, 0, tz2of(zonestr))
838:   end

[Validate]