File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/main/scala/mrkm4ntr/gitbucket/network/controller Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -89,12 +89,12 @@ trait NetworkControllerBase extends ControllerBase {
8989 def getDateMarker (date1 : Date , date2 : Option [Date ]): (Option [Int ], Option [Int ]) = date2.map { date2 =>
9090 val dateTime1 = LocalDateTime .ofInstant(date1.toInstant, ZoneId .systemDefault())
9191 val dateTime2 = LocalDateTime .ofInstant(date2.toInstant, ZoneId .systemDefault())
92- val day = if (ChronoUnit .DAYS .between(dateTime1, dateTime2) > 0 ) {
92+ val day = if (ChronoUnit .DAYS .between(dateTime1.toLocalDate , dateTime2.toLocalDate ) > 0 ) {
9393 Some (dateTime1.getDayOfMonth)
9494 } else {
9595 None
9696 }
97- val month = if (ChronoUnit .MONTHS .between(dateTime1, dateTime2) > 0 ) {
97+ val month = if (ChronoUnit .MONTHS .between(YearMonth .from( dateTime1), YearMonth .from( dateTime2) ) > 0 ) {
9898 Some (dateTime1.getMonthValue)
9999 } else {
100100 None
You can’t perform that action at this time.
0 commit comments