- Feb 19, 2001
- 7,504
- 0
- 76
function get_date_short($date) {
$today = @gmdate('Ymd', time() + (3600 * 2));
$compare = substr($date ,0,8);
$day = substr($date, 6,2);
$month = substr($date, 4,2);
$hours = substr($date, 8,2);
$minutes = substr($date, 10,2);
if ($today == $compare) {
return "$hours:$minutes";
}
else {
return "$day/$month";
}
}
function get_date_long($date) {
$day = substr($date, 6,2);
$month = substr($date, 4,2);
$year = substr($date, 0,4);
$hours = substr($date, 8,2);
$minutes = substr($date, 10,2);
return "$day-$month-$year $hours:$minutes";
}
function get_date_archive($date) {
$month = substr($date, 4,2);
$year = substr($date, 0,4);
$month_array = array("januari", "februari", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december");
$month_text = $month_array[$month - 1];
return "$month_text $year";
this script i got is from someone from germany
so the time displayed is the time in germany and the date is displayed day-month-year
how do i fix this so that the time displays central time and the date is displayed month-day-year instead?
thanks!
$today = @gmdate('Ymd', time() + (3600 * 2));
$compare = substr($date ,0,8);
$day = substr($date, 6,2);
$month = substr($date, 4,2);
$hours = substr($date, 8,2);
$minutes = substr($date, 10,2);
if ($today == $compare) {
return "$hours:$minutes";
}
else {
return "$day/$month";
}
}
function get_date_long($date) {
$day = substr($date, 6,2);
$month = substr($date, 4,2);
$year = substr($date, 0,4);
$hours = substr($date, 8,2);
$minutes = substr($date, 10,2);
return "$day-$month-$year $hours:$minutes";
}
function get_date_archive($date) {
$month = substr($date, 4,2);
$year = substr($date, 0,4);
$month_array = array("januari", "februari", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december");
$month_text = $month_array[$month - 1];
return "$month_text $year";
this script i got is from someone from germany
so the time displayed is the time in germany and the date is displayed day-month-year
how do i fix this so that the time displays central time and the date is displayed month-day-year instead?
thanks!
