added calendar format date, fixed bugs