hi,

i'm trying to customize my theme to display just the date on entries, and not include the time. it looks like i'll have to customize the format_date function in the common.inc file, but i'm not sure exactly how to do it. has anyone done this before?

thanks,
courtney

Comments

courtney’s picture

hi,

still trying to figure this out and thought i would check back...also seems like something that should be configureable. should i submit an issue/request?

courtney

bluedropstudios’s picture

courtney,

in custom.inc, format_date() also takes a 'custom' argument as one of the parameters. to have just the date, you would call format_date with something like the following:

<?php
$date_type = 'custom';
$custom_type = 'm/d/Y';
print format_date($timestamp,$date_type,$custom_type);
?>

the m/d/Y would give you the month/day/year for the specified timestamp. if you would like to use other fields, check out the PHP manual page for the date function, which gives a table for other fields you might want to use, such as day name, etc. that URL is: http://us3.php.net/manual/en/function.date.php.

hope that helps!

jeremy - the linux web guy

courtney’s picture

how simple, and it works!! thank you! :)

ThelmaR’s picture

Thanks that was quite a helpful bit of info

Umayal’s picture

how to display from and to(end) time without date ?