(PHP 4, PHP 5, PHP 7)
getdate — ȡ�����ڣ�ʱ����Ϣ
$timestamp
= time()
] ) : array
����һ������ timestamp
�ó��İ�����������Ϣ�Ĺ������� array�����û�и���ʱ�������Ϊ�ǵ�ǰ����ʱ�䡣
����һ������ timestamp
�ó��İ�����������Ϣ�Ĺ������� array��
���صĹ��������еļ�����Ԫ�����¼�����
���� | ˵�� | ����ֵ���� |
---|---|---|
"seconds" | ������ֱ�ʾ | 0 �� 59 |
"minutes" | ���ӵ����ֱ�ʾ | 0 �� 59 |
"hours" | Сʱ�����ֱ�ʾ | 0 �� 23 |
"mday" | �·��еڼ�������ֱ�ʾ | 1 �� 31 |
"wday" | �����еڼ�������ֱ�ʾ | 0 (����) �� 6 (����) |
"mon" | �·ݵ����ֱ�ʾ | 1 �� 12 |
"year" | 4 λ���ֱ�ʾ��������� | ���磺 1999 �� 2003 |
"yday" | һ���еڼ�������ֱ�ʾ | 0 �� 365 |
"weekday" | ���ڼ��������ı���ʾ | Sunday �� Saturday |
"month" | �·ݵ������ı���ʾ������ January �� March | January �� December |
0 | �Դ� Unix ��Ԫ��ʼ������������� time() �ķ���ֵ�Լ����� date() ��ֵ���ơ� | ϵͳ��أ�����ֵΪ�� -2147483648 �� 2147483647�� |
Example #1 getdate() ����
<?php
$today = getdate();
print_r($today);
?>
�������̵���������ڣ�
Array ( [seconds] => 40 [minutes] => 58 [hours] => 21 [mday] => 17 [wday] => 2 [mon] => 6 [year] => 2003 [yday] => 167 [weekday] => Tuesday [month] => June [0] => 1055901520 )