Fix custom date for phase function and add tests
0.1.0