in reply to Morning or Night?
Though it still looks rather convoluted to me....$ampm = "AM"; if ($central_time_hour%24 > 11) { $ampm = "PM"; }
Perhaps something like:
Might make this one stanza a bit better.$ampm = ($central_time_hour%24 > 11) ? "PM" : "AM";
Update: demerphq caught me moving the bug from midnight to noon... changed constants back to 11 to fix it.
-Blake
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Morning or Night?
by Kanji (Parson) on Jan 12, 2002 at 14:26 UTC |