fixed getDateRange. Almost all tests succeed now