Skip to content

Commit

Permalink
3.7.1.34
Browse files Browse the repository at this point in the history
  • Loading branch information
angcyo committed May 8, 2022
1 parent 4fe6c35 commit 2afea7f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ allprojects {
## 加入依赖

```
implementation 'com.github.angcyo:CalendarView:3.7.1.33'
implementation 'com.github.angcyo:CalendarView:3.7.1.34'
```

### `垂直滚动日历`使用方式
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public static int dpToPx(Context context, float dpValue) {

boolean isInPriorityShowWeekMode(BaseView baseView, Calendar calendar) {
long distance = CalendarUtil.distance(CalendarUtil.currentCalendar(), calendar);
return baseView.mDelegate.monthPriorityShowWeekMode && distance > 0 &&
return baseView.mDelegate.monthPriorityShowWeekMode && distance >= 0 &&
distance < CalendarUtil.MONTH_PRIORITY_DAY;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ public static boolean isCurrentMonth(int year, int month) {
public static long distance(Calendar max, Calendar min) {
long t1 = max.getTimeInMillis();
long t2 = min.getTimeInMillis();
return (long) Math.floor((t1 - t2) * 1f / ONE_DAY);
return (long) Math.ceil((t1 - t2) * 1f / ONE_DAY);
}

/**
Expand Down

0 comments on commit 2afea7f

Please sign in to comment.