Formatting date function
Posted on 2004-03-28
Ok so I have the basic time function for php:
$cur_time = date( "m/d/Y H:i:s" );
print( $cur_time );
But I'm trying to print it out tweaked a bit with different formatting. I want to output each component on a line by lane basis with the name of the field and the number value (all six fields being Month, Day, Year, Hours, Minutes, Seconds) And then I want to print the name of the month instead of the number (some form of selection perhaps) and whether it's AM or PM using 12 hour time instead of using the standard 24 hour time.
If the time has an odd number of minutes or an even number of minutes I want it to print out ODD or EVEN next to the time (I think this can be done with integer division or something)