Rechercher une fonction PHP

Time Formats

This page describes the different time formats that the strtotime(), DateTime and date_create() parser understands.

Used Symbols
Description Formats Examples
frac . [0-9]+ ".21342", ".85"
hh "0"?[1-9] | "1"[0-2] "04", "7", "12"
HH [01][0-9] | "2"[0-4] "04", "07", "19"
meridian [AaPp] .? [Mm] .? [\0\t ] "A.m.", "pM", "am."
MM [0-5][0-9] "00", "12", "59"
II [0-5][0-9] "00", "12", "59"
space [ \t]  
tz "("? [A-Za-z]{1,6} ")"? | [A-Z][a-z]+([_/][A-Z][a-z]+)+ "CEST", "Europe/Amsterdam", "America/Indiana/Knox"
tzcorrection "GMT"? [+-] hh ":"? MM? "+0400", "GMT-07:00", "-07:00"
12 Hour Notation
Description Format Examples
Hour only, with meridian hh space? meridian "4 am", "5PM"
Hour and minutes, with meridian hh [.:] MM space? meridian "4:08 am", "7:19P.M."
Hour, minutes and seconds, with meridian hh [.:] MM [.:] II space? meridian "4:08:37 am", "7:19:19P.M."
MS SQL (Hour, minutes, seconds and fraction with meridian), PHP 5.3 and later only hh ":" MM ":" II [.:] [0-9]+ meridian "4:08:39:12313am"
24 Hour Notation
Description Format Examples
Hour and minutes 't'? HH [.:] MM "04:08", "19.19", "T23:43"
Hour and minutes, no colon 't'? HH MM "0408", "t1919", "T2343"
Hour, minutes and seconds 't'? HH [.:] MM [.:] II "04.08.37", "t19:19:19"
Hour, minutes and seconds, no colon 't'? HH MM II "040837", "T191919"
Hour, minutes, seconds and timezone 't'? HH [.:] MM [.:] II space? ( tzcorrection | tz ) "040837CEST", "T191919-0700"
Hour, minutes, seconds and fraction 't'? HH [.:] MM [.:] II frac "04.08.37.81412", "19:19:19.532453"
Time zone information tz | tzcorrection "CEST", "Europe/Amsterdam", "+0430", "GMT-06:00"
Find a PHP function

English translation

You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.

If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.

Thank you in advance.

Document created the 30/01/2003, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/php-rf-datetime.formats.time.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.

References

  1. View the html document Language of the document:fr Manuel PHP : http://php.net

These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.

Contents Haut