传入变量@EndDay是smalldatetime类型的
declare @leapYear smallint
select @leapYear = case datepart(dd, dateadd(dd, -1, @EndDay)) when 29 then 1 when 28 then 0 end
@leapYear = 1的时候,就是闰年了