note description: "Date Measurement" legal: "See notice at end of class." status: "See notice at end of class." date: "$Date: 2009-01-01 12:38:30 +0000 (Thu, 01 Jan 2009) $" revision: "$Revision: 76534 $" deferred class interface DATE_MEASUREMENT feature -- Access day: INTEGER_32 -- Number of days associated with current object month: INTEGER_32 -- Number of monthes associated with current object year: INTEGER_32 -- Number of years associated with current object feature -- Element change set_date (y, m, d: INTEGER_32) -- Set year with y, month with m and day with d. require d_large_enough: d >= 1 m_large_enough: m >= 1 m_small_enough: m <= Months_in_year d_small_enough: d <= days_in_i_th_month (m, y) ensure day_set: day = d month_set: month = m year_set: year = y set_day (d: INTEGER_32) -- Set day to d. require d_large_enough: d >= 1 d_small_enough: d <= days_in_month ensure day_set: day = d set_month (m: INTEGER_32) -- Set month to m. -- day must be small enough. require m_large_enough: m >= 1 m_small_enough: m <= Months_in_year d_small_enough: day <= days_in_i_th_month (m, year) ensure month_set: month = m set_year (y: INTEGER_32) -- Set year to y. require can_not_cut_29th_feb: day <= days_in_i_th_month (month, y) ensure year_set: year = y feature -- Status Report days_in_month: INTEGER_32 -- Number of days in month 'month'. ensure positive_result: Result > 0 note copyright: "Copyright (c) 1984-2009, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software 5949 Hollister Ave., Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Website http://www.eiffel.com Customer support http://support.eiffel.com ]" end -- class DATE_MEASUREMENT
Generated by ISE EiffelStudio