¿ù°£ Àα⠰Խù°

°Ô½Ã¹° 9°Ç
   
³¯Â¥ / ½Ã°£ ÇÔ¼ö - strftime()
±Û¾´ÀÌ : ÃÖ°í°ü¸®ÀÚ ³¯Â¥ : 2011-05-23 (¿ù) 14:04 Á¶È¸ : 246013
±ÛÁÖ¼Ò :
                          

strftime
(PHP 3, PHP 4 , PHP 5)
strftime --  Áö¿ª ¼³Á¤¿¡ µû¶ó ·ÎÄà ½Ã°£/³¯Â¥¸¦ Çü½ÄÈ­ÇÑ´Ù.
 
Description
string strftime ( string format [, int timestamp])
date()ÇÔ¼ö¿Í µ¿ÀÏÇÑ ¿ªÇÒÀ» ¼öÇàÇÏ¿© ÇÔ¼ö È£Ã⠽ÿ¡ ÁöÁ¤ÇØ ÁØ format¿¡ ³¯Â¥ Á¤º¸¸¦ Ãâ·ÂÇÑ´Ù.

setlocale("LC_TIME","ko") ·Î ¼³Á¤ÇÏ¸é ¿ù¸íÀ̳ª ¿äÀϸíÀ» Çѱ۷ΠÃâ·ÂÇÒ ¼öµµ ÀÖ´Ù.
´ÙÀ½ÀÇ º¯È¯ Áö½ÃÀÚµéÀº Çü½ÄÈ­µÈ ¹®ÀÚ¿­·Î °£ÁֵȴÙ.

  %a - ÇöÀç Áö¿ª ¼³Á¤¿¡ µû¶ó Ãà¾àµÈ ¿äÀÏ À̸§ÀÌ ¹ÝȯµÈ´Ù.
  %A - ÇöÀç Áö¿ª ¼³Á¤¿¡ µû¶ó Àüü ¿äÀÏ À̸§ÀÌ ¹ÝȯµÈ´Ù.
  %b - ÇöÀç Áö¿ª ¼³Á¤¿¡ µû¶ó Ãà¾àµÈ ¿ù À̸§ÀÌ ¹ÝȯµÈ´Ù.
  %B - ÇöÀç Áö¿ª ¼³Á¤¿¡ µû¶ó Àüü ¿ù À̸§ÀÌ ¹ÝȯµÈ´Ù.
  %d - ÀÏÀÚ¸¦ µÎÀÚ¸®·Î Ãâ·ÂÇÑ´Ù.(01~31)
  %e - ÀÏÀÚ¸¦ Ãâ·ÂÇ쵂 10º¸´Ù ÀÛÀº ÀÏÀÚ´Â ÇÑÀÚ¸®·Î Ãâ·Â.
  %H - ½Ã°£À» 24½Ã°£Á¦·Î Ãâ·Â (00~23)
  %I - ½Ã°£À» 12½Ã°£Á¦·Î Ãâ·Â(01~12)
  %j - ÀÏÀÚ¸¦ 365·Î Ãâ·Â
  %m - ¿ù Ãâ·Â(01~12)
  %M - ºÐ Ãâ·Â
  %n - ÁٹٲÞ
  %p - ¿ÀÀü ¿ÀÈÄ Ãâ·Â
  %r - time in a.m. and p.m. notation  /  AM. PM Ç¥±â¹ý
  %R - time in 24 hour notation    / 24½Ã°£ Ç¥±â¹ý
  %S - second as a decimal number
  %t - tab character
  %T - current time, equal to %H:%M:%S

  %u - weekday as a decimal number [1,7], with 1 representing Monday
ÁÖÀÇ
Sun Solaris seems to start with Sunday as 1 although ISO 9889:1999 (the current C standard) clearly specifies that it should be Monday.
  %U - week number of the current year as a decimal number, starting with the first Sunday as the first day of the first week
  %V - The ISO 8601:1988 week number of the current year as a decimal number, range 01 to 53, where week 1 is the first week that has at least 4 days in the current year, and with Monday as the first day of the week. (Use %G or %g for the year component that corresponds to the week number for the specified timestamp.)
  %W - week number of the current year as a decimal number, starting with the first Monday as the first day of the first week
  %w - day of the week as a decimal, Sunday being 0
  %x - preferred date representation for the current locale without the time
  %X - preferred time representation for the current locale without the date
  %y - year as a decimal number without a century (range 00 to 99)
  %Y - year as a decimal number including the century
  %Z - time zone or name or abbreviation
 
  %% - a literal `%' character

À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

 



 
»çÀÌÆ®¸í : ¸ðÁö¸®³× | ´ëÇ¥ : ÀÌ°æÇö | °³ÀÎÄ¿¹Â´ÏƼ : ·©Å°´åÄÄ ¿î¿µÃ¼Á¦(OS) | °æ±âµµ ¼º³²½Ã ºÐ´ç±¸ | ÀüÀÚ¿ìÆí : mojily°ñ¹ðÀÌchonnom.com Copyright ¨Ï www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.