What is the difference between Calendar.WEEK_OF_MONTH and Calendar.DAY_OF_WEEK_IN_MONTH in Java's Calendar class? -


java's calendar class provides 2 fields: week_of_month , day_of_week_in_month. can explain difference me? seems both return same value when tested using code below:

calendar date = calendar.getinstance(); date.set(2011,5,29); int weekno1 = date.get(calendar.week_of_month); int weekno2 = date.get(calendar.day_of_week_in_month); 

week of month week within current month starting sundays how many weeks have there been.

day of week of month day 5 thursday, 1 sunday ect.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -