indexing
description: "Values of date"
status: "See notice at end of class"
date: "$Date$"
revision: "$Revision$"
access: date
class interface
DATE_VALUE
feature
compact_date: INTEGER
date_default_format_string: STRING
DATE_CONSTANTS
day: INTEGER
days_in_i_th_month (i, y: INTEGER): INTEGER
iy
DATE_CONSTANTS
require DATE_CONSTANTS
i_large_enough: i >= 1
i_small_enough: i <= months_in_year
Days_in_leap_year: INTEGER is 366
DATE_CONSTANTS
Days_in_non_leap_year: INTEGER is 365
DATE_CONSTANTS
Days_in_week: INTEGER is 7
DATE_CONSTANTS
days_text: ARRAY [STRING]
DATE_CONSTANTS
long_days_text: ARRAY [STRING]
DATE_CONSTANTS
long_months_text: ARRAY [STRING]
DATE_CONSTANTS
Max_weeks_in_year: INTEGER is 53
DATE_CONSTANTS
month: INTEGER
Months_in_year: INTEGER is 12
DATE_CONSTANTS
months_text: ARRAY [STRING]
DATE_CONSTANTS
year: INTEGER
feature
is_leap_year (y: INTEGER): BOOLEAN
y
DATE_CONSTANTS
feature
set_day (d: INTEGER)
dayd
require DATE_MEASUREMENT
d_large_enough: d >= 1
d_small_enough: d <= days_in_month
ensure DATE_MEASUREMENT
day_set: day = d
set_month (m: INTEGER)
monthm
require DATE_MEASUREMENT
m_large_enough: m >= 1
m_small_enough: m <= months_in_year
d_small_enough: day <= days_in_i_th_month (m, year)
ensure DATE_MEASUREMENT
month_set: month = m
set_year (y: INTEGER)
yeary
require DATE_MEASUREMENT
can_not_cut_29th_feb: day <= days_in_i_th_month (month, y)
ensure DATE_MEASUREMENT
year_set: year = y
feature
days_in_month: INTEGER
DATE_MEASUREMENT
ensure DATE_MEASUREMENT
positive_result: Result > 0
invariant
ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)
end -- DATE_VALUE