2009-08-31 2 views

답변

33

봐()와 한 strtotime() :

echo date('Y'); 
echo date('Y', strtotime('+1 year')); 
13

당신은 날짜의 일부를 추출하는 날짜 기능을 사용할 수 있습니다 :

$year = date("Y"); // get the year part of the current date 
$nextYear = $year + 1; 

을 니펫 here를 실행합니다.

0

... 그리고 strftime('%Y') 그것을하지 너무

6
<?php 
$date="2010-04-30"; 
$y = date('Y',strtotime($date)); 
echo $y; 
?> 
관련 문제