タイムスタンプではなく、YYYY/MM/DD形式で日付を保持している時に曜日を取得するには以下のようすると「Sunday」「Saturday」という形で曜日を取得することができる。 date("l", mktime(0, 0, 0, 11, 2, 2006)); 曜日を数値(0の日曜日から始まり6の土曜日で終わる)で取得したい場合はdateの第1引数のlをwに変えるだけで良い。 って、ここまで書いてPHPマニュアルに載ってたことを知った・・・。
タイムスタンプではなく、YYYY/MM/DD形式で日付を保持している時に曜日を取得するには以下のようすると「Sunday」「Saturday」という形で曜日を取得することができる。 date("l", mktime(0, 0, 0, 11, 2, 2006)); 曜日を数値(0の日曜日から始まり6の土曜日で終わる)で取得したい場合はdateの第1引数のlをwに変えるだけで良い。 って、ここまで書いてPHPマニュアルに載ってたことを知った・・・。
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く