- 博客(3)
- 收藏
- 关注
原创 打印本月日历
else if (i == calendar.get(Calendar.DAY_OF_WEEK)) { // 日期的右侧没有空格,星期几前面有四个空格。} else if (i == calendar.get(Calendar.AM_PM)) { // 当日为下午或上午的最后一小时,前面不加空格。} else if (i < calendar.get(Calendar.AM_PM)) { // 日期的左侧没有空格,星期几前面有四个空格。if ((i + 6) % 7 == 0) { // 每7天换行。
2023-12-01 11:44:03 373 1
原创 代码打印日历
if ((i % 7 == 0) || (i == calendar.get(Calendar.AM_PM))) { // 每行打印7个日期和空格。} else if (i == calendar.get(Calendar.AM_PM)) { // 当日为下午或上午的最后一小时,前面不加空格。} else if (i < calendar.get(Calendar.AM_PM)) { // 日期的左侧没有空格,星期几前面有四个空格。if ((i + 6) % 7 == 0) { // 每7天换行。
2023-12-01 11:33:15 469 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人