Fixed date functions to match spec and docs. Added unit tests for date functions.
Update test cases to reflect revised syntax for date functions.