RE: Date

OK.  Here is a Schema for the element suggested by Martin

<xsd:element name = 'myDate'>
   <xsd:simpleType>
      <xsd:restriction base='xsd:string'>
          <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]))"/>  
      </xsd:restriction>
    </xsd:simpleType>
    <xsd:attribute name= 'value' type='xsd:date'>
</xsd:element>      

All the best, Ashok 
===========================================================

-----Original Message-----
From: Chelkowski, Tadeusz [mailto:Tadeusz.Chelkowski@softwareag.com] 
Sent: Wednesday, July 04, 2001 6:40 AM
To: xmlschema-dev@w3.org
Subject: RE: Date

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 10:03:36 UTC