Fix leading zero handling for year and date rules