[ http://issues.apache.org/jira/browse/OFBIZ-392?page=all ]
Jacopo Cappellato updated OFBIZ-392:
------------------------------------
Attachment: UtilDateTime-reviewed.patch
I'd propose this slightly different patch, where I've used Calendar.SUNDAY
instead of 1 Calendar.MONDAY instead of 2: I think that in this was it's a bit
more easier to read.
However, I don't quite understand the following code:
if(startOfWeek == Calendar.MONDAY) {
calendar.setMinimalDaysInFirstWeek(4);
} else if(startOfWeek == Calendar.SUNDAY) {
calendar.setMinimalDaysInFirstWeek(3);
}
but this is due to my ignorance about the method
calendar.setMinimalDaysInFirstWeek(...)
Apart from this, I really think that this is a good patch because it
reimplements an old method following a more standard approach (i.e. using the
Calendar class instead of custom code).
> Wrong week numbers in the fixed asset calendar
> ----------------------------------------------
>
> Key: OFBIZ-392
> URL: http://issues.apache.org/jira/browse/OFBIZ-392
> Project: OFBiz (The Open for Business Project)
> Issue Type: Improvement
> Components: accounting
> Reporter: Bilgin Ibryam
> Priority: Minor
> Attachments: UtilDateTime-reviewed.patch, UtilDateTime.patch
>
>
> Week numbers in the fixed asset calendar are not correct. So i fixed the
> problematic function and also added a possibility for choosing the week start
> day (Sunday or Monday).
> Regards,
> Bilgin
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira