fixed custom date handling