Changeset 397 for ruby/trunk/lib/open_ehr/assumed_library_types.rb
- Timestamp:
- Jan 19, 2010, 8:54:57 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ruby/trunk/lib/open_ehr/assumed_library_types.rb
r369 r397 135 135 136 136 module ISO8601DateModule 137 include Comparable 137 138 attr_reader :year, :month, :day 138 139 … … 180 181 month_unknown? or day_unknown? 181 182 end 182 183 184 def <=>(other) 185 (@year*TimeDefinitions::NOMINAL_DAYS_IN_YEAR + 186 @month*TimeDefinitions::NOMINAL_DAYS_IN_MONTH + @day) <=> 187 (other.year*TimeDefinitions::NOMINAL_DAYS_IN_YEAR + 188 other.month*TimeDefinitions::NOMINAL_DAYS_IN_MONTH + other.month) 189 end 183 190 protected 184 191 def leapyear?(year)
Note:
See TracChangeset
for help on using the changeset viewer.