knashat / NewJSProject

Created with CodeSandbox
https://codesandbox.io/s/github/knashat/NewJSProject
0 stars 0 forks source link

We have to have a long discussion about this 😂 #2

Closed amrsekilly closed 4 years ago

amrsekilly commented 4 years ago

https://github.com/knashat/NewJSProject/blob/927a233dc15694748419b45fd96153b4e6ebaebc/2ndAssignment.js#L10

knashat commented 4 years ago

https://github.com/knashat/NewJSProject/blob/927a233dc15694748419b45fd96153b4e6ebaebc/2ndAssignment.js#L10

Is it that bad!

amrsekilly commented 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.

knashat commented 4 years ago

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

amrsekilly commented 4 years ago

@knashat you can assume that it's 356 days for simplification. Or use the Date API to handle this.

amrsekilly commented 4 years ago

I recommend you look into DayJS and MomentJS too.

knashat commented 4 years ago

Ok, I will