G
GfxGuy
I'm trying to write a simple display of any given month, outputting an
HTML string. The requirements are that we use a standard business week
(as defined by my company, anyway), which starts on Monday, not Sunday,
and for my own anal retentiveness, the each month needs to have a
uniform appearance... 6 rows, since that's the maximum number of
displayed weeks a month will have.
The calendar is very "week" centric. In other words, I don't care what
day the user selects, what is important is the week of the year.
Java's Calendar conveniently provides that to you.
So here's the problem. I set the first day of the week to be
Calendar.MONDAY. I'm wondering what effect this actually has, because
the week is still incremented every SUNDAY. This is true for the
WEEK_OF_THE_YEAR as well as the WEEK_OF_THE_MONTH, so it's both
screwing up my formatting and, more importantly, screwing up the
selected week if the user clicks on Sunday.
I have work arounds, but I'm really curious if I'm doing something
wrong, making wrong assumptions about how Calendar works, or if this
would be considered a bug.
HTML string. The requirements are that we use a standard business week
(as defined by my company, anyway), which starts on Monday, not Sunday,
and for my own anal retentiveness, the each month needs to have a
uniform appearance... 6 rows, since that's the maximum number of
displayed weeks a month will have.
The calendar is very "week" centric. In other words, I don't care what
day the user selects, what is important is the week of the year.
Java's Calendar conveniently provides that to you.
So here's the problem. I set the first day of the week to be
Calendar.MONDAY. I'm wondering what effect this actually has, because
the week is still incremented every SUNDAY. This is true for the
WEEK_OF_THE_YEAR as well as the WEEK_OF_THE_MONTH, so it's both
screwing up my formatting and, more importantly, screwing up the
selected week if the user clicks on Sunday.
I have work arounds, but I'm really curious if I'm doing something
wrong, making wrong assumptions about how Calendar works, or if this
would be considered a bug.