Page 1 of 1

A way to not display minutes if they are zeros?

Posted: Wed Sep 09, 2009 9:35 am
by jaybuckner
Is there a way to not show the minutes when they are zeros? For example, 3:00 pm should display as 3 pm; however, 3:01 pm should display the same as 3:01 pm. Let it be know that I'm not a coder, but I'm attempting to modify a calendar so that the double zeros don't display. Thanks for any help you can offer.

Re: A way to not display minutes if they are zeros?

Posted: Wed Sep 09, 2009 10:14 am
by jayshields

Code: Select all

if($minutes != '00') echo $minutes; //if $minutes is a string
if(($minutes > 0) echo $minutes; //if $minutes is an integer