I have a problem with my DateTime function.
I'm using a function form different places
function newDateFormat($date, $format) {
$newdate = new DateTime($date);
if($format == '1')
{
$newdate = $newdate->format('Y-m-d H:i:s');
}elseif($format == '2'){
$newdate = $newdate->format('Y-m-d');
}
return $newdate;}
When I use this function for adding a new event in my fullcalendar its works fine. But my problem is when I try to use it for an update to the calendar and it says
Warning: require(libs/DateFormat.php): failed to open stream: No such file or directory in /Applications/MAMP/htdocs/coach/index.php on line 12
I have no such a file in my libs directory as it is from php.
any one knows ho to get this working?
Thanks for the help