달력소스 질문입니다 ㅠ.ㅠ 채택완료
humanb2box
8년 전
조회 2,272
</p>
<p>if (!function_exists("get_first_day")) {
// mktime() 함수는 1970 ~ 2038년까지만 계산되므로 사용하지 않음
// 참고 : <a href="http://phpschool.com/bbs2/inc_view.html?id=3924&code=tnt2&start=0&mode=search&s_que=mktime&field=title&operator=and&period=all" target="_blank" rel="noopener noreferrer">http://phpschool.com/bbs2/inc_view.html?id=3924&code=tnt2&start=0&mode=search&s_que=mktime&field=title&operator=and&period=all</a>
function get_first_day($year, $month)
{
$day = 1;
$spacer = array(0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4);
$year = $year - ($month < 3);
$result = ($year + (int) ($year/4) - (int) ($year/100) + (int) ($year/400) + $spacer[$month-1] + $day) % 7;
return $result;
}
}</p>
<p>// 예약일 선택하면 넘어오는 지점
if ($_GET['param1'])
{
$hospitalFK = $_GET['param1'];
unset($param1);
}</p>
<p>if ($_GET['param2'])
{
$schedule_ym = $_GET['param2'];
unset($param2);
}</p>
<p>// 오늘
$today = getdate($g4[server_time]);</p>
<p>
그누보드4 소스를 5로 커스터마이징 중인데요 ㅠㅠ
위에 코드를 못 읽겠어요 ㅠㅠ
위에 대로 넣으면 날짜가 1970년도로 잡히네요 ㅠㅠ
어디를 고쳐야할지 혹시 주석을 달아 주실 수 있나요? ㅠㅠㅠ
댓글을 작성하려면 로그인이 필요합니다.
답변 2개
답변을 작성하려면 로그인이 필요합니다.
로그인
1번줄부터 11번줄까지 때문에 오늘날짜가 1970년도로 나와용,, 제가 코드가 안읽혀서요,,
오늘날짜를 잡고싶거든요,,