Time variables overview
The following conversion specifiers are recognized in the format string (taken from the PHP documentation for the strftime function). More info in the Open Group Specification
- %a - abbreviated weekday name according to the current locale
- %A - full weekday name according to the current locale
- %b - abbreviated month name according to the current locale
- %B - full month name according to the current locale
- %c - preferred date and time representation for the current locale
- %d - day of the month as a decimal number (range 00 to 31)
- %H - hour as a decimal number using a 24-hour clock (range 00 to 23)
- %I - hour as a decimal number using a 12-hour clock (range 01 to 12)
- %j - day of the year as a decimal number (range 001 to 366)
- %m - month as a decimal number (range 1 to 12)
- %M - minute as a decimal number
- %p - either `am" or `pm" according to the given time value,or the corresponding strings for the current locale
- %S - second as a decimal number
- %U - week number of the current year as a decimal number,starting with the first Sunday as the first day of the first week
- %W - week number of the current year as a decimal number,starting with the first Monday as the first day of the first week
- %w - day of the week as a decimal,Sunday being 0
- %x - preferred date representation for the current locale without the time
- %X - preferred time representation for the current locale without the date
- %y - year as a decimal number without a century (range 00 to 99)
- %Y - year as a decimal number including the century
- %Z - time zone or name or abbreviation
- %% - a literal `%" character
時間変数の概要
次の変換記述は文字列フォーマットに基づきます(PHPドキュメントのstrftime関数から持ってきたものです)。より詳しい情報は Open Group Specificationにあります。
- %a - 現在のロケールに基づく短縮された曜日の名前
- %A - 現在のロケールに基づく完全な曜日の名前
- %b - 現在のロケールに基づく短縮された月の名前
- %B - 現在のロケールに基づく完全な月の名前
- %c - 現在のロケールに基づく適当な日付と時間の表現
- %d - 日付を10進数で(01から31)
- %H - 時間を24時間表示の10進数で(00から23まで)
- %I - 時間を12時間表示の10進数で(01から12までの範囲)
- %j - 年間での日付を10進数で表現 (001から366)
- %m - 月を10進数で表現 (01から12)
- %M - 分を10進数で表現
- %p - 指定した時間により "am" または "pm" 、または 現在のロケールに対応した文字列
- %S - 秒を10進数で表現
- %U - 年間で何番目の週であるかを 10 進数で表現。 年間で最初の日曜を最初の週の最初の日として数えます。
- %W - 現在の年で何番目の週であるかを10進数で表現。 年間で最初の月曜を最初の週の最初の日として数えます。
- %w - 曜日を10進数で表現。日曜は0になります。
- %x - 時間を除いた日付を現在のロケールに基づき表現します。
- %X - 日付を除いた時間を現在のロケールに基づき表現します。
- %y - 世紀の部分を除いた年を10進数として表現。(00から99までの範囲)
- %Y - 世紀を含む年を 10進数で表現
- %Z - タイムゾーンまたはその名前または短縮形
- %% - 文字リテラル"%"
以下はサーバによって対応が異なりますので、参考程度にお試しください。
- %-dまたは%#d - 日付を10進数で(1から31)
- %-Hまたは%#H - 時間を24時間表示の10進数で(0から23まで)
- %-Iまたは%#I - 時間を12時間表示の10進数で(1から12までの範囲)
- %-mまたは%#m - 月を10進数で表現 (1から12)
- %-Mまたは%#M - 分を10進数で表現(0から59まで)
コメント送信
Nucleusをご利用いただき、ありがとうございます。ヘルプファイルの内容について気がついた事がございましたら、コメントフォームよりご連絡ください。
いただきましたコメントは、次期バージョンの「オンラインヘルプ」に反映させてまいります。
なお、コチラでは個別対応は出来ませんので、疑問点などございましたら、サポートフォーラムへ投稿をお願いいたします。
コメント
コメントはありません