Today I am having a rather strange problem with my date range.
$oBeginDate = newDateTime('last wednesday');
$oEndDate = newDateTime('next tuesday');
echo $oBeginDate->format('d/m/Y') . ' to ' . $oEndDate->format('d/m/Y');
This should usually display 14/12/2010 to 21/12/2010, but today, 14/12/2010, it is displaying 08/12/2010 to 21/12/2010.
Any suggestions as to how I can fix this problem?
newDateTimeis not a php library function. I think you meannew DateTime