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

Home » Imported messages » comp.lang.php » Verifying time in php
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Verifying time in php [message #179388 is a reply to message #179386] Sun, 14 October 2012 17:41 Go to previous messageGo to previous message
houghi is currently offline  houghi
Messages: 45
Registered: September 2011
Karma:
Member
Martin Leese wrote:
>>
>> Challenging curcumstance: "A" "B" "C" cast to int becomes 0:0:0, which
>> is a valid time.
>
> But not a valid *duration* (which is what
> the OP actually wants).

Indeed and that is where I got stuck several times. So I started
thinking outside the box and for the test I do not care what the values
are, as long as they are values.

I then came up with if 1, 2 and 3 are ok, then 123 is OK as well.
If 4, Y and <empty> is not OK, then 4Y is not ok either.

As far as internationalisation goes, a dot will fork, a comma won't.
Even though I live in a country where should use a comma, I always se a
dot.

houghi
--
This is written under the inluence of the following:
> Artist : Santana
> Song : Europa (Earth's Heaven's Smile)
> Album : Moonflower
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Curl chmod file transfer problem...
Next Topic: test
Goto Forum:
  

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

Current Time: Sat Nov 23 17:28:32 GMT 2024

Total time taken to generate the page: 0.04159 seconds