Re: [PHP] Military <-> Standard times

2009-01-22 Thread Frank Stanovcak
"Richard Heyes" wrote in message news:af8726440901220050i71d99bf7m5425620f67350...@mail.gmail.com... >> PS - I think the best ever name for a Exception class is 'Tantrum': >> >>throw new Tantrum('Ra Ra Ra Aaaargh'); > > Lol. > > -- > Richard Heyes > > HTML5 Graphing for Firefox, Chrome,

Re: [PHP] Military <-> Standard times

2009-01-22 Thread tedd
At 12:35 AM +0100 1/22/09, Jochem Maas wrote: >> tedd schreef: > Hey, you called me "schreef" and that means "an end of a stroke" (Arrggg, that has all sorts of meanings). :-) which translation service came up with that?? it is funny though :-) http://nl.wikipedia.org/wiki/Schreef -

Re: [PHP] Military <-> Standard times

2009-01-22 Thread Richard Heyes
> PS - I think the best ever name for a Exception class is 'Tantrum': > >throw new Tantrum('Ra Ra Ra Aaaargh'); Lol. -- Richard Heyes HTML5 Graphing for Firefox, Chrome, Opera and Safari: http://www.rgraph.org (Updated January 17th) -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Military <-> Standard times

2009-01-21 Thread Jochem Maas
tedd schreef: > At 9:19 PM +0100 1/21/09, Jochem Maas wrote: >> tedd schreef: >>> Hi gang: >> >> would you stop calling me that, I'll bet it means something rude in >> korean. :-P > > Hey, you called me "schreef" and that means "an end of a stroke" > (Arrggg, that has all sorts of meanings). :-)

Re: [PHP] Military <-> Standard times

2009-01-21 Thread tedd
At 9:06 PM + 1/21/09, Nathan Rixham wrote: -snip- :P It's a good thing I didn't ask for anything complicated. :-) Thanks. And what's with everyone sticking out their tongue? :-P Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP Gen

Re: [PHP] Military <-> Standard times

2009-01-21 Thread tedd
At 9:19 PM +0100 1/21/09, Jochem Maas wrote: tedd schreef: Hi gang: would you stop calling me that, I'll bet it means something rude in korean. :-P Hey, you called me "schreef" and that means "an end of a stroke" (Arrggg, that has all sorts of meanings). :-) wouldn't the slickest way

Re: [PHP] Military <-> Standard times

2009-01-21 Thread Nathan Rixham
Jochem Maas wrote: tedd schreef: Hi gang: would you stop calling me that, I'll bet it means something rude in korean. :-P What's the slickest way to go from "standard" to military times and back again? wouldn't the slickest way be to carry/store unixtimestamps and then output whatever vers

Re: [PHP] Military <-> Standard times

2009-01-21 Thread Nitsan Bin-Nun
Umm I don't think there is a better option, you probably can return the output straight: function standardToMilitary($t) { return strftime('%R', strtotime($t)); } function militaryToStandard($t) { return strftime('%r', strtotime($t)); } But it doesn't really matter. On Wed, Jan 21,

Re: [PHP] Military <-> Standard times

2009-01-21 Thread Jochem Maas
tedd schreef: > Hi gang: would you stop calling me that, I'll bet it means something rude in korean. :-P > What's the slickest way to go from "standard" to military times and back > again? wouldn't the slickest way be to carry/store unixtimestamps and then output whatever version you need when y

[PHP] Military <-> Standard times

2009-01-21 Thread tedd
Hi gang: What's the slickest way to go from "standard" to military times and back again? Such as: 0800 -> 8:00am 8:00am -> 0800 -- or -- 1600 -> 4:00pm 4:00pm -> 1600 I use the following functions, but is there anything better? function standardToMilitary($t) { $t = strftime('%R', str