W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2001

RE: Date

From: Ashok Malhotra <ashokma@microsoft.com>
Date: Wed, 4 Jul 2001 05:58:01 -0700
Message-ID: <9D884881F5E1F24FB845967851720FC31D1B34@red-msg-12.redmond.corp.microsoft.com>
To: "Martin Duerst" <duerst@w3.org>, "Chelkowski, Tadeusz" <Tadeusz.Chelkowski@softwareag.com>, <xmlschema-dev@w3.org>
The schema for your format is not difficult to write but before that
The CCYYMMDD format should allow an optional negative sign and five
characters in the CCYY format.

To write the schema, you would first create a simple type that restricts
"string" with a pattern corresponding to the format discussed above.
This pattern should, as far as possible only allow legal date values
i.e. the first D in the DD field should allow only 0,1,2 or 3.  The
bigger problem is whether you want to disallow February 30 and November
31 with a pattern.

All the best, Ashok 
Ashok Malhotra              <mailto: ashokma@microsoft.com> 
Microsoft Corporation
212 Hessian Hills Road
Croton-On-Hudson, NY 10520 USA 
Redmond: 425-703-9462                New York: 914-271-6477 

-----Original Message-----
From: Martin Duerst [mailto:duerst@w3.org] 
Sent: Tuesday, July 03, 2001 5:01 AM
To: Chelkowski, Tadeusz; xmlschema-dev@w3.org
Subject: Re: Date

Hello Tadeusz,

The unique format was chosen to make it very easy to exchange data.
If you need to markup some actual text in another format, or you
otherwise want to keep another format, I suggest you use something

<date value='CCYY-MM-DD'>CCYYMMDD</date>

Regards,   Martin.

P.S.: If somebody can write a schema for the above fragment,
       we'll probably add it (in one form or another) to the
       type library.

At 11:11 01/07/03 +0200, Chelkowski, Tadeusz wrote:
>How to declare an element xsd:date but default set for separators are
>(-) i would like to have date in pure CCYYMMDD format not in
>Thank you
>Tadeusz Chelkowski, Software AG Poland
Received on Wednesday, 4 July 2001 09:24:15 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:52 UTC