altered leap-year adjustment for date function