idate

It formats a local time/date as integerExample

<?php
$timestamp = strtotime(‘1st January 2007’);
echo idate(‘y’, $timestamp);
?>

Below given are the format characters

B,d,h,H,i,I,L,m,s,t,U,w,W,y,Y,z,Z

Output

7