본문 바로가기

Programming/php

[php] 날짜함수 활용 정리


http://www.w3schools.com/php/php_date.asp 에서 참고!


날짜관련항목

d - Represents the day of the month (01 to 31)

m - Represents a month (01 to 12)

Y - Represents a year (in four digits)

l (lowercase 'L') - Represents the day of the week


시간관련항목

h - 12-hour format of an hour with leading zeros (01 to 12)

i - Minutes with leading zeros (00 to 59)

s - Seconds with leading zeros (00 to 59)

a - Lowercase Ante meridiem and Post meridiem (am or pm)


활용가능한 함수

mktime(hour,minute,second,month,day,year);

strtotime(time,now);