Fixed a method of counting days