18.97.9.173´Ô ·Î±×ÀÎ ÇØÁÖ¼¼¿ä

MY wikix
óÀ½À¸·Î
³»¼Ò°³
»çÁø¹æ
°øºÎ¸Ç
ÀϱâÀå
¿µÈ­±¤
µ¶¼­±¤
À⵿»ç´Ï
¹æ¸í·Ï
À§Å° ÆäÀÌÁö
¸ðµç ÆäÀÌÁö
Àαâ ÆäÀÌÁö
º¯°æ ÆäÀÌÁö
°Ë»öÇϱâ

Today : 14  Total : 392064
ppabaki's wikix ^^v

diff of Dday

page id: 1149, 2635 hits, unlocked, unhidden, current: v3
v2:2007-01-20 16:08:31(2,729), v3:2007-01-20 16:10:34(2,862)
diff v2:ºü¹Ù±â v3:ºü¹Ù±â

=
= !! Dday ¼Ò½º 1¹ø
= {{{
= <?php
= // D-day °ü·Ã ¼Ò½º ºÎºÐ
= if(!$settime || strlen($settime)!=14) $settime = date("YmdHis");
=
= if(!$unixtime || strlen($unixtime)!=10) {
= $YY = substr($settime,0,4);
= $mm = substr($settime,4,2);
= $dd = substr($settime,6,2);
= $HH = substr($settime,8,2);
= $ii = substr($settime,10,2);
= $ss = substr($settime,12,2);
= // $unixtime = date("U", mktime($HH,$ii,$ss,$mm,$dd,$YY));
= $a=strtotime ("2006-03-15"); //D-Day ³¯Â¥ ¼ÂÆÃ
= // date('Y-m-d',$a);
= $unixtime = date("U", $a);
=
= }
= $two = "";
= $one = "";
= $dday = date("z",$unixtime) - date("z");
= if($dday >= 0)
= {
= $d1 = sprintf("%02d",$dday);
= }
= else
= {
= $d1 = sprintf("%02d",$dday * -1);
= }
= $two = substr("$d1",0,1); // ½ÊÀÚ¸® ¼ýÀÚ
= $one = substr("$d1",1,2); // ÀÏÀÚ¸® ¼ýÀÚ
= ?>
=
=
= ½ÊÀÚ¸® ¿Í 1ÀÚ¸®ÀÇ ¼ýÀÚ¸¦ °¢°¢ »êÃâÇÏ´Â D-Day ±â´É
= ³¯Â¥¿¡ ¸ÂÃ߾ À̹ÌÁöµîÀ» °¢°¢ ºÒ·¯¿Ã Àû¿¡ À¯¿ëÇÕ´Ï´Ù.
= }}}
=
= !! µÎ¹ø°¼Ò½º
= {{{
= $sday=mktime(00,00,00,1,23,2002); //ƯÁ¤ÀÏ
= $tday=mktime();
= $dday=intval(($tday-$sday)/86400)+1; //ÇÏ·ç´õÇØÁÖ°í¿ä
=
= echo \"$dday\";
= ÀÌ·¸°Ô ÇÏ¸é ½±°ÔµÇÁ®..^^
= }}}
=
= !! ¼¼¹ø°¼Ò½º
= {{{
= <?
= $oneday = 86400;
= $_today = mktime();
=
= $today = date("Y³â m¿ù dÀÏ (l) ÀÔ´Ï´Ù",$_today);
=
= echo "¿À´ÃÀº ".$today."<br><br>";
=
= ?>
=
= <html>
= <head>
= <title>±â³äÀÏ ³¯Â¥ °è»ê±â</title>
= </head>
=
= <body bgcolor=white text=black>
=
= <form name=daycount method=post action=<?=$PHP_SELF;?>>
= <input type=hidden name=result value='yes'>
= óÀ½ ¸¸³­ ³¯ : <input type=text name=m_year value='<?=$m_year;?>' size=4> ³â
= <input type=text name=m_month value='<?=$m_month;?>' size=2> ¿ù
= <input type=text name=m_day value='<?=$m_day;?>' size=2> ÀÏ
= <br><br>
= ù ¸¸³² ÀÌÈÄ <input type=text name=w_day value='<?=$w_day;?>' size=6> ÀÏ° µÇ´Â ³¯À» ¾Ë°í ½Í¾î¿ä.
= <br><br>
= <input type=submit value='¾Ë·Á´Ù¿À'>
= </form>
=
= <?
=
= if ( $result == "yes" )
= {
=
= $m_today = mktime("0","0","0",$m_month,$m_day,$m_year);
= $h_today = ( $_today - $m_today ) / $oneday;
= $h_today = round($h_today);
= //$h_today++; // +1ÀÏ ÇØÁÖ¾î¾ß ÇÑ´Ù. ¸¸³­³¯ºÎÅÍ 1ÀÏÀ̱⠶§¹®¿¡;;
= echo "¿À´ÃºÎ·Î ¸¸³­Áö ".$h_today."ÀÏ µÇ¾ú½À´Ï´Ù.<br><br>";
=
= if ( ( date("m",$_today) == $m_month ) && (date("d",$_today) == $m_day ) )
= {
= $congu_year = date("Y",$_today) - $m_year;
= echo "¿À! ÃàÇÏÇÕ´Ï´Ù. ¿À´ÃÀº ¸¸³ª½ÅÁö $congu_year ³â ° µÇ´Â ³¯ÀÔ´Ï´Ù!<br><br>";
= }
=
= $_w_day = $w_day * $oneday - $oneday; // ²À ÇÏ·ç ´õ »©Áà¾ß ÇÕ´Ï´Ù. ¿Ö±×·±Áö´Â »ý°¢Çغ¸¼¼¿ä -¤µ-
= $_w_today = $m_today + $_w_day;
= $w_today = date("Y³â m¿ù dÀÏ (l)", $_w_today);
= echo "¸¸³­Áö $w_day ÀÏ µÇ´Â ³¯Àº $w_today ÀÔ´Ï´Ù.";
=
= }
=
= ?>
=
= </body>
= </html>
=
= ÇãÁ¢ÇÏÁö¸¸ ÇÊ¿äÇϽźÐ...Àß »ç¿ëÇϼ¼¿ä^^
= ¾Æ..Á¦°¡ ¸¸µç°Ç ¾Æ´Ï¿¡¿ä...
= }}}
=
= !! 4¹ø° ¼Ò½º
= {{{
= $ToTime = strtotime("20061020"); ÇϽøé ŸÀÓ½ºÅÆÇÁ°ªÀ» ¾òÀ¸½Ç ¼ö ÀÖ½À´Ï´Ù.
+
+ // ÀϼöÂ÷ÀÌ ±¸Çϱâ
+ $aq = '2006-01-10';
+ $aw = '2006-01-01';
+ echo date("z", strtotime($aq)) - date("z", strtotime($aw)); // 9
+
= }}}
=

ViewPage

Last :   Who : ºü¹Ù±â
Version : v
hits