+ 5
any ideas to improve this code please?
5 Respuestas
+ 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.
+ 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.
+ 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
+ 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. 😉
+ 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