Modified to use Calendar instead of Date.
First revision for unit tests.
Added restrictions to xsd definitions