New way of handling date

Should address memory bug