A simple algorithm request
-
Does anyone have an algorithm that avoids a month table which computes the last day in a month?
-
Does anyone have an algorithm that avoids a month table which computes the last day in a month?
convert to date (1- x+1 - year); // where x is the month number - obviously you need to take care of December. reduce 1 day from it. Hope it helps :)
It is Good to be Important but! it is more Important to be Good
-
Does anyone have an algorithm that avoids a month table which computes the last day in a month?
I'd get the 1st day of the month after the one you're interested in, then subtract 1 day.
CQ de W5ALT
Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software
-
Does anyone have an algorithm that avoids a month table which computes the last day in a month?
My date/time compendium[^] holds that and much more. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
Getting an article published on CodeProject now is hard and not sufficiently rewarded.