From: Antoine T. <ath...@al...> - 2001-12-20 19:43:46
|
Hello I use the Calendar class to convert dates to UDate Firstly, I set the Calendar with the void Calendar::set ( EDateFields field, int32_t value) function When i set the Calendar the following way : YEAR, MONTH and DATE Then, i call getTime to get the UDate I have activated the Lenient mode of the Calendar, so, i can know when my date is false with the UErrorCode of getTime (for example, if a put as date 30 february 2002, a get a Error through the UErrorCode parameter of getTime) But, there is the problem If, instead of setting the calendar with YEAR, MONTH and DATE, i use one of the combination : MONTH + WEEK_OF_MONTH + DAY_OF_WEEK MONTH + DAY_OF_WEEK_IN_MONTH + DAY_OF_WEEK DAY_OF_WEEK + WEEK_OF_YEAR The Lenient system don't seems to work, I explain myself for MONTH + WEEK_OF_MONTH + DAY_OF_WEEK for example I Input 2002(year) / 0(month) / 6(week) / 1(day) it gives me the UDate for 2002/1/2/1 instead of "returning" a Error through the UErrorCode there is the same problem for the others way of setting the calendar (ex : always in lenient mode .. week 53 of year 2002, day 1 and 7 are both valids for lenient conversion ..) I haven't found many documentation on the Lenient system So, i'd like to know.. - if this "error" is normal (Perhaps Lenient only works with YEAR + MONTH + DATE ?) - If this is a bug, think you it could be corrected quickly ? (i have not yet checked the Lenient code of the getTime ...) Got Any Idea ? (it's perhaps a stupid error i do ..) Thanks in advance Antoine Thierry Alpha Centauri ps : Excuse my froggish-english .. :) |