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

RE: Date

From: Chelkowski, Tadeusz <Tadeusz.Chelkowski@softwareag.com>
Date: Wed, 4 Jul 2001 15:40:10 +0200
Message-ID: <6B2492D663ECD4119EB70008C7E6F673011168E7@softwareag.com>
To: xmlschema-dev@w3.org
Ashok

Yes'Ive created the
<xsd:pattern
value="((2[0-9][0-9][0-9])|(1[0-9][0-9][0-9]))((0[0-9])|(1[0-2]))(([0-2][1-9
])|(3[0-1]))"/>

but to check all 31-30 month or febuary  thats more complicated thats why i
would like to use standard xsd:dated format and use it with CCYYMMDD format
instead of CCYY-MM-DD.


Regards
Tadeusz Chelkowski, Software AG Poland

-----Original Message-----
From: Ashok Malhotra [mailto:ashokma@microsoft.com]
Sent: Wednesday, July 04, 2001 2:58 PM
To: Martin Duerst; Chelkowski, Tadeusz; xmlschema-dev@w3.org
Subject: RE: Date


Martin:
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
like

<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:
>Hello!
>How to declare an element xsd:date but default set for separators are
dashes
>(-) i would like to have date in pure CCYYMMDD format not in
CCYY-MM-DD.
>Thank you
>
>Regards
>Tadeusz Chelkowski, Software AG Poland
Received on Wednesday, 4 July 2001 09:40:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:22 GMT