-- AMGA-15, added code to handle smarty date functions