Description
Solutions
Days Since Last Login 🐠
🤘 INTERN📚RELATED PROBLEMS
At Alarm.com we need a new piece of functionality that will tell us how many days it's been since a user last logged into our site. Our product manager has given us the following requirements that they would like implemented so that we can start tracking inactive users.
Minimally Viable Product
Things to consider
Example 1:
Input: lastLoginDate = "07/06/2022"
Output: "1"
Explanation:Input = "07/06/2022" Today = 07/07/2022 Output = "1"
Example 2:
Input: lastLoginDate = "02/30/2020"
Output: "E1756"
Explanation:The input "02/30/2020" is in the correct format but not a valid date because February does not have 30 days. Therefore, the function returns the error code "E1756". (By Tomtato. If you find it wrong, pls lmk! THX 🩵!)
Constraints:
Unknown for now..


Related Problems
Testcase
Result
Case 1
input:
output: