Avatar of David Schure
David Schure

asked on 

Time Format

I am using this format for tiem.  It works great. Only problem is that it shows 12:00 as 00:00 what do I need to adjust on this? Please.
$startTime = sprintf("%02d:00", $i % 12) . ($i < 12 ? 'am' : 'pm');
$endTime = sprintf("%02d:00", ($i+1) % 12) . ($i < 11 ? 'am' : 'pm'); // same as $i = 1 < 12

Open in new window


PHP

Avatar of undefined
Last Comment
gr8gonzo

8/22/2022 - Mon