Jump to content

DATETIME output help.


virtuexru

Recommended Posts

this is how I've done it:

<?php
function formatDate($date)
{
	$date = explode("-", $date);
	$date = date("d. F, Y", mktime(0, 0, 0, $date[1], $date[2], $date[0]));
	$enMonthArray = array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
	$noMonthArray = array('Januar', 'Februar', 'Mars', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Desember');
	return str_replace($enMonthArray, $noMonthArray, $date);
}
function formatTime($time)
{
	$time = explode(":", $time);
	return $time[0].":".$time[1];
}
?>

Link to comment
https://forums.phpfreaks.com/topic/47555-datetime-output-help/#findComment-232116
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.