Closed amrsekilly closed 4 years ago
It's very hard to understand, and I'm not sure if it's right. Checkout Greedy algorithms in JS, and Recursion in JS.
I was very overwhelmed, I couldn't stop thinking that the simpler solution is not that accurate as month is not always 30 days and year is not always 356 days it could be 366 ... :D
@knashat you can assume that it's 356 days for simplification. Or use the Date API to handle this.
I recommend you look into DayJS and MomentJS too.
Ok, I will
https://github.com/knashat/NewJSProject/blob/927a233dc15694748419b45fd96153b4e6ebaebc/2ndAssignment.js#L10