¼Ò½º¿¡ ´ëÇÑ Áú¹®ÀÔ´Ï´Ù..
¾Æ·¡ÀÇ ¼Ò½ºÁß¿¡¼...ÇöÀç´Â ³â°ú ¿ùº°·Î ´Þ·ÂÀÌ ³ª¿À´Â ¼Ò½ºÀÔ´Ï´Ù..
±Ùµ¥ Á¦°¡ ±¸ÇöÇÏ°íÀÚÇÏ´Â °ÍÀº ¿À´Ã³¯Â¥ Áï, 2001³â 4¿ù24ÀϺÎÅÍ Ãâ·ÂÇÏ¿©
´ÙÀ½´Þ 5¿ù23ÀϱîÁö Ãâ·ÂÀ» ÇÒ·Á°í ÇÕ´Ï´Ù..
4¿ù 24ÀϺÎÅÍ ´ç¿ù 30ÀϱîÁö Ãâ·ÂÇÏ°Ô´Â ÇÒ ¼ö ÀÖÁö¸¸...
30ÀÏ µÚ¿¡ ¹Ù·Î 5¿ù´ÞÀÇ 1ÀϺÎÅÍ 23ÀϱîÁö ³ª¿Ã ¼ö ÀÖ°Ô ÇÒ·Á°í ÇÕ´Ï´Ù..
Á¶°Ç¹®¿¡¼ Á¶±Ý¼öÁ¤ÇÏ¸é µÉ²¨ °°Àºµ¥....
´É·ÂºÎÁ·À̶ó¼ Á¶°Ç¹®À» ´Þ¼ö°¡ ¾ø¾î¼ ÀÌ·¸°Ô ±ÛÀ» ³²°Üº¾´Ï´Ù..
¾Æ½Ã¸é ´äº¯Á» ÇØÁÖ¼¼¿ä.....¤Ð¤Ð...ºÎŹµå¸³´Ï´Ù.
########## Çش翬¿ùÀÇ Àϼö¸¦ °è»êÇÑ´Ù.
function get_totaldays($year,$month) {
$date = 1;
while(checkdate($month,$date,$year)) {
$date++;
}
$date--;
return $date;
}
########## Çش翬¿ùÀÇ ´Þ·ÂÀ» Ãâ·ÂÇÑ´Ù.
function showCalendar($year,$month,$total_days)
{
$first_day = date('w', mktime(0,0,0,$month,1,$year));
echo("$first_day
|
ÀÏ | ¿ù | È | ¼ö | ¸ñ | ±Ý | Åä |
---|
");
$col = 0; for($i = 0; $i < $first_day; $i++) { echo(" | "); $col++; }
for($j = 1; $j <= $total_days; $j++) { echo(" $j | "); $col++;
if($col == 7) { echo(" "); if($j != $total_days) { echo(""); } $col = 0; } } while($col > 0 && $col < 7) { echo(" | "); $col++; }
echo("
|
");
}
?>
PHP·Î ±¸ÇöÇÏ´Â ´Þ·ÂÇÁ·Î±×·¥ $inputY = "2002";
$inputM = "2";
$totaldays = get_totaldays($inputY,$inputM);
showCalendar($inputY,$inputM,$totaldays);
?>