indexing
	description: "Facility routines to check the validity of DATEs"
	status: "See note at end of class"
	date: "$Date$"
	revision: "$Revision$"

class interface
	DATE_VALIDITY_CHECKER

feature -- Preconditions

	compact_date_valid (c_d: INTEGER): BOOLEAN
			-- Is compact date c_d valid?

	date_valid (s: STRING; code_string: STRING): BOOLEAN
			-- Is the code_string enough precise
			-- To create an instance of type DATE
			-- And does the string s correspond to code_string?
		require
			s_exists: s /= void
			code_exists: code_string /= void

	date_valid_default (s: STRING): BOOLEAN
			-- Is the code_string enough precise
			-- To create an instance of type DATE
			-- And does the string s correspond to
			-- date_default_format_string?
		require
			s_exists: s /= void

	date_valid_default_with_base (s: STRING; base: INTEGER): BOOLEAN
			-- Is the code_string enough precise
			-- To create an instance of type DATE
			-- And does the string s correspond to
			-- date_default_format_string?
			-- Use base century base.
		require
			s_exists: s /= void
			base_valid: base > 0 and (base \\ 100 = 0)

	date_valid_with_base (s: STRING; code_string: STRING; base: INTEGER): BOOLEAN
			-- Is the code_string enough precise
			-- To create an instance of type DATE
			-- And does the string s correspond to code_string?
			-- Use base century base.
		require
			s_exists: s /= void
			code_exists: code_string /= void
			base_valid: base > 0 and (base \\ 100 = 0)

	is_correct_date (y, m, d: INTEGER): BOOLEAN
			-- Is date specified by y, m, and d a correct date?
	
invariant

		-- from ANY
	reflexive_equality: standard_is_equal (Current)
	reflexive_conformance: conforms_to (Current)

end -- class DATE_VALIDITY_CHECKER