new test for formatValue date value, fix bugs found in testing