24th Dec 2018, 4:53 PM
Ahmad Ali
Ahmad Ali - avatar
5 Antworten
+ 5
1) y % 100 == 0 && is redundant if you follow it by y%400 ==0 as the second condition contains the first. so just keep the second. 2) It would be nice if instead of displaying a number of the month we could see the name.
24th Dec 2018, 5:06 PM
Asirap
+ 4
I like the suggestions from Asirap. Sham XR Another improvement could be to use the current date. The output could include the following: >Today is Monday, December 24, 2018 and there are 7 days remaining for this month. You could then take this up a notch and include additional details like: >This is day 358 of the year with only 7 day(s) remaining.
24th Dec 2018, 5:28 PM
David Carroll
David Carroll - avatar
+ 3
Sham XR Nice improvements. I added a few refinements that you may want to consider as well. https://code.sololearn.com/cYxY2Xx17o68/?ref=app
1st Jan 2019, 9:12 PM
David Carroll
David Carroll - avatar
+ 2
Sham XR Thanks for removing those links to your code in those other threads. This helps keep the posts on topic and reduces so much clutter. I've removed my requests and your responses from those other threads. There is no need to keep those around. 😉
24th Dec 2018, 5:48 PM
David Carroll
David Carroll - avatar
+ 2
i have made some changes to the code, you can check them if you interested. thank you https://code.sololearn.com/c3LtMrknFDQv/?ref=app
1st Jan 2019, 8:13 PM
Ahmad Ali
Ahmad Ali - avatar