<div align="center">
<table border="1">
<col width="100"><col width="100"><col width="100"><col width="100"><col width="100"><col width="100"><col width="100">
<tr height="100">
<td colspan="7" align="center" style="padding-top: 20px">
<%=pp %> <%=p %>
<font color="black" style="font-size: 50px">
<%=String.format("%d년 %d월", year , month) %>
</font>
<%=n %> <%=nn %>
</td>
</tr>
<tr height="50">
<th align="center">일</th>
<th align="center">월</th>
<th align="center">화</th>
<th align="center">수</th>
<th align="center">목</th>
<th align="center">금</th>
<th align="center">토</th>
</tr>
<tr height="100" align="left" valign="top">
<%
//위쪽 빈칸
for(int i = 1; i < dayOfWeek; i++){
%>
<td style="background-color: #cecece"> </td>
<%
}
//날짜
int lastday = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
for(int i = 1; i <= lastday; i++){
%>
<td>
<%=UtilEx.callist(year, month, i) %> <%=UtilEx.showPen(year, month, i) %>
<%=UtilEx.makeTable(year, month, i, list) %>
</td>
<%
if( (i + dayOfWeek - 1) % 7 == 0 && i != lastday){ // && 뒤에 있는 부분이 마지막날짜면 바로 끝내게 해주는 것 안해주면 한열 더생김
%>
</tr><tr height="100" align="left" valign="top">
<%
}
}
%>
<%-- 밑에 빈칸 --%>
<%
cal.set(Calendar.DATE, lastday); // 그 달의 마지막 날짜로 세팅
int weekday = cal.get(Calendar.DAY_OF_WEEK);
for(int i = 0 ; i < 7 - weekday; i ++){
//아래 코드는 빈칸 색깔코드
%>
<td style="background-color: #cecece"> </td>
<%
}
%>
</tr>
</table>
</div>
'팁???' 카테고리의 다른 글
깃베시 -bash: ./gradlew: Permission denied 뜰때 (0) | 2022.06.30 |
---|---|
깃허브 액쎤~~ + plain jar 파일 생성 막기요 (0) | 2022.06.28 |
참조 에러 (0) | 2022.06.04 |
nohup 종료 방법 (0) | 2022.06.01 |
ㅈㅏㅇㅡㅁㅁㅗㅇㅡㅁ 이 ㅈㄹ할때 (3) | 2022.06.01 |