Quantcast
Channel: sand a lot » strtotime
Browsing all 4 articles
Browse latest View live

PHPの関数strtotimeの使用例

PHPの『strtotime()』という関数について、実際の使用例をいろいろ列挙します。 〜週間前を取得 : strtotime(“-3 weeks”); 〜時間後を取得 : strtotime(“+4 hours”); […]

View Article


PHPの日付関連の関数など(3)

恐らく、日付を比較する時に使用することが多い関数strtotime()についてです。 ■strtotime()について 文字列をUNIXタイムスタンプに変換する関数。 様々な文字列をUNIXタイムスタンプに変換できるので […]

View Article


PHP –現在時刻の取得方法いろいろ

■現在時刻の取得方法はいろいろあります。それを記述してみます。 ☆UNIXタイムスタンプで取得 time() strtotime("Now") date("U") mktime() 現在時刻をUNIXタイムスタンプで、と […]

View Article

query_postsやget_postsで期間を設定する方法

query_postsやget_postsは、引数に普通のパラメータを渡す方法だと、ある日付のみのデータ取得は出来ても、いつからいつまでというような期間を設定する事ができない(と思う。) それを設定するには、以下のコード […]

View Article
Browsing all 4 articles
Browse latest View live