diff --git a/ChangeLog b/ChangeLog index bcc70a7ad..93eaa248f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-03-16 reussandras@gmail.com + + * base/Source/NSCalendar.m: + Add simple quarter calculation. + 2012-03-16 Richard Frith-Macdonald * NSTimeZones/NSTimeZones.tar: Update timezone information diff --git a/Source/NSCalendar.m b/Source/NSCalendar.m index d258fa50f..c09a66974 100644 --- a/Source/NSCalendar.m +++ b/Source/NSCalendar.m @@ -68,7 +68,8 @@ static UCalendarDateFields _NSCalendarUnitToDateField (NSCalendarUnit unit) // FIXME: Is this right??? return UCAL_DAY_OF_WEEK_IN_MONTH; // ICU doesn't include a quarter DateField... - + if (unit & NSQuarterCalendarUnit) + return (UCAL_MONTH + 2) / 3; return -1; } #endif /* GS_USE_ICU */