Please manage some conditions in the date variable. May be defaults send you a nil value if it is nil. And check the case if it nil then put another date in the date variable.
Don’t direct pass the userDefaults value in date variable
Please manage some conditions in the date variable. May be defaults send you a nil value if it is nil. And check the case if it nil then put another date in the date variable.
Don’t direct pass the userDefaults value in date variable