i want to get number of weeks in current month.That including the previous month\'s days in the last week and the first week days in the next month.
Something like t
Let's assume we know the first day of the month (Saturday, Sunday etc).
Sunday and it's not a leap-year, then the (correction edit) February month will have only 4 weeks. Otherwise, in all the cases, it should have at least 5 and at most 6 weeks.Saturday, you'll always have 6 weeks (excluding if it is February, when it there will be 5)Friday, you'll have 6 weeks for months having 31 days and 5 for all others.Finding out the 1st day of the month shouldn't be difficult, you can use Calendar or other date/time utility library classes. However, I guess there could be cleaner solutions removing the corner cases and unnecessary complexity.