FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » comparing dates?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: comparing dates? [message #175522 is a reply to message #175520] Mon, 03 October 2011 18:59 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 10/3/2011 11:50 AM, Doug Miller wrote:
> On 10/3/2011 12:54 AM, Gordon Burditt wrote:
>>>> I need to know if a date (say 10/03/2011) is before another date in
>>>> the same format. Direct comparison doesn't work.
>>>
>>> Direct comparison certainly does work, as long as you have it formatted
>>> as year-month-day.
>>
>> Careful.
>>
>> "2011-10-03" compares less than "2011-3-7" if you use a straight
>> string comparison.
>
> But those aren't the same format.
>>
>> If you require a sufficient number of leading zeroes, and a consistent
>> separator, it will work OK. But it's also likely to have a Y10K
>> problem.
>
> I think it's a pretty safe bet that software developed today will not be
> in use 7989 years later.
>

I don't know, Doug. That's what they said in the 60's about Yr2K.

Code doesn't become obsolete - it just keeps getting modified :)

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: simple image in PHP
Next Topic: Question about new lines
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 17:01:12 GMT 2024

Total time taken to generate the page: 0.03941 seconds