Changeset 289 for ruby/branches/0.5/lib/open_ehr
- Timestamp:
- Sep 23, 2009, 5:12:03 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ruby/branches/0.5/lib/open_ehr/assumed_library_types.rb
r288 r289 481 481 end # end of ISO8601Timezone 482 482 483 module ISO8601 _DURATION_MODULE483 module ISO8601DurationModule 484 484 attr_reader :years, :months, :weeks, :days 485 485 attr_reader :hours, :minutes, :seconds, :fractional_second … … 572 572 end 573 573 574 class ISO8601 _DURATION< TimeDefinitions575 include ISO8601 _DURATION_MODULE574 class ISO8601Duration < TimeDefinitions 575 include ISO8601DurationModule 576 576 def initialize(str) 577 577 /^P((\d+)Y)?((\d+)M)?((\d+)W)?((\d)D)?(T((\d+)H)?((\d+)M)?((\d+)(\.\d+)?S)?)?$/ =~ str … … 585 585 self.fractional_second = $16.to_f 586 586 end 587 end # end of ISO8601 _DURATION587 end # end of ISO8601Duration 588 588 end # end of Assumed_Types 589 589 end # end of OpenEHR
Note:
See TracChangeset
for help on using the changeset viewer.