[Zope] "The strange DateTime"

Andreas Jung Andreas Jung <lists@andreas-jung.com>
Thu, 30 Jan 2003 08:28:08 +0100


The DateTime parser is odd in many ways. Feel free to submit a patch ;-)

-aj

--On Donnerstag, 30. Januar 2003 09:24 +0200 Rares Vernica 
<verni0@hotmail.com> wrote:

> Yes, that's not a valid DateTime.
> The funny thing is that I don't get any error message.
> ;-)
>
> Regards,
> Rares
>
>> From: Andreas Jung <lists@andreas-jung.com>
>> Reply-To: Andreas Jung <lists@andreas-jung.com>
>> To: Rares Vernica <verni0@hotmail.com>, zope@zope.org
>> Subject: Re: [Zope] "The strange DateTime"
>> Date: Wed, 29 Jan 2003 12:46:00 +0100
>>
>> DateTime tries to be smart but it is not always all the time.
>> On the other hand 23/23/23 is not a valid date.
>>
>> -aj
>>
>> --On Mittwoch, 29. Januar 2003 12:45 +0200 Rares Vernica
>> <verni0@hotmail.com> wrote:
>>
>>> Hi,
>>>
>>> I have a real nice one here.
>>>
>>>>>> import DateTime
>>>>>> a=DateTime.DateTime("23/23/23")
>>>>>> a
>>> DateTime('2003/01/29')
>>>
>>> Today is 29-01-2003.
>>> Can you help me, maybe I'm wrong?!
>>>
>>> Thanks in advance,
>>> Rares
>>>
>>>
>>> _________________________________________________________________
>>> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
>>> http://join.msn.com/?page=features/virus
>>>
>>>
>>> _______________________________________________
>>> Zope maillist  -  Zope@zope.org
>>> http://lists.zope.org/mailman/listinfo/zope
>>> **   No cross posts or HTML encoding!  **
>>> (Related lists -  http://lists.zope.org/mailman/listinfo/zope-announce
>>>  http://lists.zope.org/mailman/listinfo/zope-dev )
>>
>>
>>
>>
>>    ---------------------------------------------------------------------
>>   -    Andreas Jung                     http://www.andreas-jung.com   -
>>  -   EMail: andreas at andreas-jung.com                              -
>>   -            "Life is too short to (re)write parsers"               -
>>    ---------------------------------------------------------------------
>
>
> _________________________________________________________________
> Add photos to your messages with MSN 8. Get 2 months FREE*.
> http://join.msn.com/?page=features/featuredemail
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )




    ---------------------------------------------------------------------
   -    Andreas Jung                     http://www.andreas-jung.com   -
  -   EMail: andreas at andreas-jung.com                              -
   -            "Life is too short to (re)write parsers"               -
    ---------------------------------------------------------------------