Assuming sample input xml:
<root>
<datevalue>2013-05-29</datevalue>
</root>
sample XSD code would be like:
<xs:element name="root">
<xs:complexType>
<xs:element name='datevalue' minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="[0-2][0-9][0-9][0-9]
|[0-2][0-9][0-9][0-9][-][01|02|03|04|05|06|07|08|09|10|11|12]
|[0-2][0-9][0-9][0-9][-][01|02|03|04|05|06|07|08|09|10|11|12][-][01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31]"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:complexType>
</xs:element>
Values can be either:
0000 to 2999
or 0000-01 to 2999-12
or 0000-01-01 to 2999-12-31
Since you say that there can be potential non-realistic values and we have to accept it as is.. I have one more approach for you, which has quite simpler code:
<xs:element name="root">
<xs:complexType>
<xs:element name='datevalue' minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="[0-2][0-9][0-9][0-9]
|[0-2][0-9][0-9][0-9][-][0-1][0-9]
|[0-2][0-9][0-9][0-9][-][0-1][0-9][-][0-3][0-9]"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:complexType>
</xs:element>
Values can be either:
0000 to 2999
or 0000-00 to 2999-12 (to 2999-19)
or 0000-00-00 to 2999-12-31 (to 2999-19-39)