patch25
This commit is contained in:
parent
e56d7cf00c
commit
c9692719bb
@ -92,14 +92,14 @@ public class Progress {
|
||||
cal.set(Calendar.MILLISECOND, millisecond);
|
||||
int daysInMonth = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
|
||||
if(month == 1) {
|
||||
return (daysInMonth * monthProgress + totalCountOfDaysInAYear - daysInMonth) / totalCountOfDaysInAYear;
|
||||
return (daysInMonth * monthProgress) / totalCountOfDaysInAYear;
|
||||
} else {
|
||||
cal.set(Calendar.MONTH, month - 2);
|
||||
cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));
|
||||
int totalDaysUntilLastDayOfLastMonth = cal.get(Calendar.DAY_OF_YEAR);
|
||||
cal.set(Calendar.MONTH, month - 1);
|
||||
cal.set(Calendar.DAY_OF_MONTH, day);
|
||||
return (totalDaysUntilLastDayOfLastMonth + (daysInMonth * monthProgress) + (totalCountOfDaysInAYear - totalDaysUntilLastDayOfLastMonth - daysInMonth))/totalCountOfDaysInAYear;
|
||||
return (totalDaysUntilLastDayOfLastMonth + (daysInMonth * monthProgress)) / totalCountOfDaysInAYear;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user