#Algorithm to determine the total numbers in one month i.e January 31 days, May 31, November 30 etc..
1 messages · Page 1 of 1 (latest)
<@&987246746478460948> please have a look, thanks.
While you are waiting for getting help, here are some tips to improve your experience:
If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.
Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.
Wym algorithm
Month lengths were decided by people based on religion and politics most commonly used calendar is the goergian calendar
The Gregorian calendar is the calendar used in most parts of the world. It was introduced in October 1582 by Pope Gregory XIII as a modification of, and replacement for, the Julian calendar. The principal change was to space leap years differently so as to make the average calendar year 365.2425 days long, more closely approximating the 365.2422...
You can use probably java Calendar api go get days in specific month
There is an algorithm see solution 3 http://www.dispersiondesign.com/articles/time/number_of_days_in_a_month#:~:text=The number of days in a month can be calculated,year is a leap year.
How to calculate the number of days in a month with code examples presented in multiple programming languages.
But it's kinda of goofy
Why would you describe it as goofy? I meant the Georgorian calendar btw
Why did they make February have 28 days and 29 on leap year ...
Isn't this how it normally works?
Yes maybe poorly designed imo
I am all ears
Lol this one is decent somewhat
Most days are either 30 or 31 days
But then there is "xtra" month lol
I think this is reasonable
@snow lake @snow lake why not simply use java classes?
Month month = ...;
month.maxLength()
LocalDate date = ...;
date.lenthOfMonth()
yes thats what I said but I also showed the other solution
maybe he needed algorithm for school