| | |
| | | return true; |
| | | } |
| | | |
| | | //判断是不是周一 如果日期不是周一,则将它调整到本周周一 |
| | | //获取本周周一 |
| | | public static Date WeeklyMonday (Date date) { |
| | | LocalDate localDate = LocalDate.of(timeYest(date), timeMonth(date), timeDay(date)); |
| | | // 判断是不是周一 则将它调整到下周周一 |
| | | if (WeeklyOneSign(date)) { |
| | | localDate = localDate.with(TemporalAdjusters.next(DayOfWeek.MONDAY)); |
| | | } |
| | | |
| | | // 将LocalDate转换为Date |
| | | Date monday = DateLocalDate(localDate); |
| | | |
| | | // 则将它调整到本周周一 |
| | | Date nowMonday = timeFrontSevenYesterday(monday); |
| | | |
| | | |
| | | return nowMonday; |
| | | return timeFrontSevenYesterday(monday); |
| | | } |
| | | |
| | | //获取当前日期所在的周一及周日时间 |