fixed daysAsSql once again

tests are working again.