There is no separate format for getting time only??
For example,
I want two times to be added 10:00:00 and 00:30:00
How can I proceed further?
このページでは、 DateTimeImmutable, DateTime, date_create(), date_create_immutable(), そして strtotime() のパーサーが理解する、 さまざまな時刻フォーマットを説明します。
シンボル | 書式 | 例 |
---|---|---|
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" |
説明 | 書式 | 例 |
---|---|---|
時、午前/午後 | hh space ? meridian |
"4 am", "5PM" |
時、分、午前/午後 | hh [.:] MM space ? meridian |
"4:08 am", "7:19P.M." |
時、分、秒、午前/午後 | hh [.:] MM [.:] II space ? meridian |
"4:08:37 am", "7:19:19P.M." |
MS SQL (時、分、秒、端数、午前/午後) | hh ":" MM ":" II [.:] [0-9]+ meridian |
"4:08:39:12313am" |
説明 | 書式 | 例 |
---|---|---|
時、分 | 't'? HH [.:] MM |
"04:08", "19.19", "T23:43" |
時、分(コロンなし) | 't'? HH MM |
"0408", "t1919", "T2343" |
時、分、秒 | 't'? HH [.:] MM [.:] II |
"04.08.37", "t19:19:19" |
時、分、秒(コロンなし) | 't'? HH MM II |
"040837", "T191919" |
時、分、秒、タイムゾーン | 't'? HH [.:] MM [.:] II space ? ( tzcorrection | tz ) |
"040837CEST", "T191919-0700" |
時、分、秒、端数 | 't'? HH [.:] MM [.:] II frac |
"04.08.37.81412", "19:19:19.532453" |
タイムゾーン | tz | tzcorrection |
"CEST", "Europe/Amsterdam", "+0430", "GMT-06:00" |