Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #7318
| From | Martin Leese <please@see.Web.for.e-mail.INVALID> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: Verifying time in php |
| Date | 2012-10-14 11:06 -0600 |
| Organization | A noiseless patient Spider |
| Message-ID | <k5ereu$i87$1@dont-email.me> (permalink) |
| References | (1 earlier) <slrnk7l52o.3f9.houghi@penne.houghi> <advrhmFroasU1@mid.individual.net> <slrnk7llq2.3f9.houghi@penne.houghi> <rhnl78lfjj7jv81qqbofvp0334fbkdrv0e@mfesser.de> <slrnk7lqq2.4ja.hellsop@nibelheim.ninehells.com> |
Peter H. Coffin wrote: > On Sun, 14 Oct 2012 17:50:48 +0200, Michael Fesser wrote: >> I wouldn't care too much about invalid inputs. Instead I would just take >> what I get and see what I can do with it. >> >> So I would explicitly cast all values to int (invalid or empty values >> will become 0), then just do a simple range check on all of the three >> values and then do the math. > > 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). -- Regards, Martin Leese E-mail: please@see.Web.for.e-mail.INVALID Web: http://members.tripod.com/martin_leese/
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Verifying time in php houghi <houghi@houghi.org.invalid> - 2012-10-14 11:45 +0200
Re: Verifying time in php Denis McMahon <denismfmcmahon@gmail.com> - 2012-10-14 10:25 +0000
Re: Verifying time in php houghi <houghi@houghi.org.invalid> - 2012-10-14 13:50 +0200
Re: Verifying time in php Denis McMahon <denismfmcmahon@gmail.com> - 2012-10-14 21:12 +0000
Re: Verifying time in php houghi <houghi@houghi.org.invalid> - 2012-10-14 12:30 +0200
Re: Verifying time in php "J.O. Aho" <user@example.net> - 2012-10-14 15:03 +0200
Re: Verifying time in php houghi <houghi@houghi.org.invalid> - 2012-10-14 17:16 +0200
Re: Verifying time in php Michael Fesser <netizen@gmx.de> - 2012-10-14 17:50 +0200
Re: Verifying time in php "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-10-14 18:22 +0200
Re: Verifying time in php "Peter H. Coffin" <hellsop@ninehells.com> - 2012-10-14 11:41 -0500
Re: Verifying time in php Martin Leese <please@see.Web.for.e-mail.INVALID> - 2012-10-14 11:06 -0600
Re: Verifying time in php houghi <houghi@houghi.org.invalid> - 2012-10-14 19:41 +0200
Re: Verifying time in php Michael Fesser <netizen@gmx.de> - 2012-10-14 21:03 +0200
Re: Verifying time in php houghi <houghi@houghi.org.invalid> - 2012-10-14 22:39 +0200
Re: Verifying time in php Christoph Becker <cmbecker69@gmx.de> - 2012-10-14 17:52 +0200
Re: Verifying time in php houghi <houghi@houghi.org.invalid> - 2012-10-14 19:20 +0200
Re: Verifying time in php "J.O. Aho" <user@example.net> - 2012-10-14 20:41 +0200
Re: Verifying time in php Christoph Becker <cmbecker69@gmx.de> - 2012-10-14 20:49 +0200
Re: Verifying time in php houghi <houghi@houghi.org.invalid> - 2012-10-14 22:32 +0200
Re: Verifying time in php Richard Damon <news.x.richarddamon@xoxy.net> - 2012-10-14 11:44 -0400
Re: Verifying time in php Luuk <luuk@invalid.lan> - 2012-10-14 21:28 +0200
csiph-web