获取本月的阳历周列表 @param start 星期几作为一周的开始,1234560分别代表星期一至星期天 @return 周列表
(int start)
| 130 | * @return 周列表 |
| 131 | */ |
| 132 | public List<SolarWeek> getWeeks(int start) { |
| 133 | List<SolarWeek> l = new ArrayList<SolarWeek>(); |
| 134 | SolarWeek week = SolarWeek.fromYmd(year, month, 1, start); |
| 135 | while (true) { |
| 136 | l.add(week); |
| 137 | week = week.next(1, false); |
| 138 | Solar firstDay = week.getFirstDay(); |
| 139 | if (firstDay.getYear() > year || firstDay.getMonth() > month) { |
| 140 | break; |
| 141 | } |
| 142 | } |
| 143 | return l; |
| 144 | } |
| 145 | |
| 146 | /** |
| 147 | * 获取往后推几个月的阳历月,如果要往前推,则月数用负数 |
nothing calls this directly
no test coverage detected