Skip to content

Commit 8bb5618

Browse files
Owen LinAndroid (Google) Code Review
authored andcommitted
Merge "Fix 5654631. It forgot to consider the year in formatDateRange." into ics-mr1
2 parents 1889bb4 + b193e35 commit 8bb5618

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/java/android/text/format/DateUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1415,7 +1415,7 @@ public static Formatter formatDateRange(Context context, Formatter formatter, lo
14151415
}
14161416
}
14171417

1418-
if (noMonthDay && startMonthNum == endMonthNum) {
1418+
if (noMonthDay && startMonthNum == endMonthNum && startYear == endYear) {
14191419
// Example: "January, 2008"
14201420
return formatter.format("%s", startDate.format(defaultDateFormat));
14211421
}

0 commit comments

Comments
 (0)