[BugFix #660] getYMDFromCoordinate() and getCoordinateFromYMD() fixed. Fixed timescale behavior. Fixed unit-tests.