php 指定日を加算し取得する strtotime
指定日から特定の日時を取得する
$date = strtotime('2020-01-22 16:00:00');
// 2020/01/22 16時から30秒前
echo date('Y-m-d H:i:s', strtotime('-30 sec', $date)); // 2020-01-22 15:59:30
// 2020/01/22 16時から10分前
echo date('Y-m-d H:i:s', strtotime('-10 min', $date)); // 2020-01-22 15:50:00
// 2020/01/22 16時から3時間前
echo date('Y-m-d H:i:s', strtotime('-3 hour', $date)); // 2020-01-22 13:00:00
// 2020/01/22 16時から1週間前
echo date('Y-m-d H:i:s', strtotime('-1 week', $date)); // 2020-01-15 16:00:00
// 2020/01/22 16時から7日前
echo date('Y-m-d H:i:s', strtotime('-7 day', $date)); // 2020-01-15 16:00:00
// 2020/01/22 16時から3か月後
echo date('Y-m-d H:i:s', strtotime('+3 month', $date)); // 2020-04-22 16:00:00
// 2020/01/22 16時から1年前
echo date('Y-m-d H:i:s', strtotime('-1 year', $date)); // 2019-01-22 16:00:00
-----------------
現在時間から特定の日時を取得
※time()はつけなくてもよい
// 30秒前
echo date("Y-m-d H:i:s", strtotime("-30 sec")); // 30秒前
// 10分前
echo date("Y-m-d H:i:s", strtotime("-10 min")); // 10分前
// 1時間前
echo date('Y-m-d H:i:s', strtotime('-1 hour', time()));
// 1週間前
echo date('Y-m-d H:i:s', strtotime('-1 week', time()));
// 7日後
echo date('Y-m-d H:i:s', strtotime('+7 day', time()));
// 7日前
echo date('Y-m-d H:i:s', strtotime('-7 day', time()));
// 3か月後
echo date('Y-m-d H:i:s', strtotime('+3 month'));
// 3か月前
echo date('Y-m-d H:i:s', strtotime('-3 month'));
// 1年後
echo date('Y-m-d H:i:s', strtotime('+1 year'));
// 1年前
echo date('Y-m-d H:i:s', strtotime('-1 year'));
$date = strtotime('2020-01-22 16:00:00');
// 2020/01/22 16時から30秒前
echo date('Y-m-d H:i:s', strtotime('-30 sec', $date)); // 2020-01-22 15:59:30
// 2020/01/22 16時から10分前
echo date('Y-m-d H:i:s', strtotime('-10 min', $date)); // 2020-01-22 15:50:00
// 2020/01/22 16時から3時間前
echo date('Y-m-d H:i:s', strtotime('-3 hour', $date)); // 2020-01-22 13:00:00
// 2020/01/22 16時から1週間前
echo date('Y-m-d H:i:s', strtotime('-1 week', $date)); // 2020-01-15 16:00:00
// 2020/01/22 16時から7日前
echo date('Y-m-d H:i:s', strtotime('-7 day', $date)); // 2020-01-15 16:00:00
// 2020/01/22 16時から3か月後
echo date('Y-m-d H:i:s', strtotime('+3 month', $date)); // 2020-04-22 16:00:00
// 2020/01/22 16時から1年前
echo date('Y-m-d H:i:s', strtotime('-1 year', $date)); // 2019-01-22 16:00:00
-----------------
現在時間から特定の日時を取得
※time()はつけなくてもよい
// 30秒前
echo date("Y-m-d H:i:s", strtotime("-30 sec")); // 30秒前
// 10分前
echo date("Y-m-d H:i:s", strtotime("-10 min")); // 10分前
// 1時間前
echo date('Y-m-d H:i:s', strtotime('-1 hour', time()));
// 1週間前
echo date('Y-m-d H:i:s', strtotime('-1 week', time()));
// 7日後
echo date('Y-m-d H:i:s', strtotime('+7 day', time()));
// 7日前
echo date('Y-m-d H:i:s', strtotime('-7 day', time()));
// 3か月後
echo date('Y-m-d H:i:s', strtotime('+3 month'));
// 3か月前
echo date('Y-m-d H:i:s', strtotime('-3 month'));
// 1年後
echo date('Y-m-d H:i:s', strtotime('+1 year'));
// 1年前
echo date('Y-m-d H:i:s', strtotime('-1 year'));
サーバコマンド
∟php5.3のインストール(CentOS)
∟mysqlのインストール(CentOS)
∟apacheのインストールと起動(CentOS)
∟apacheのログの確認(CentOS)
レンタルサーバ/VPS
プログラミング
∟簡単なAJAXプログラム php js html
∟TinyMCEのインストール 設定 textarea
∟TinyMCEの日本語化インストール
開発フリーソフト
∟AptanaStudio3(Windows7)
∟AptanaStudio3日本語化
PHPで画像認証をする
プログラミング
∟Android 画像ファイルを描画する
開発フリーソフト
∟AptanaStudio3(Windows7)
∟AptanaStudio3日本語化
∟Androidエミュレータのインストール
∟iBBDemo3 iPhone/iPad表示エミュレータ
Android端末ChromeでJavaScriptデバック
Googleウェブマスターツールの登録
Googleアナリティクスの使い方
Google検索結果ページを削除する
Googleトレンド
Google AdWords[キーワードツール]
関連ワードを調べる
急上昇ワードを調べる
colorpicker
colorbox
colorbox[2]
newsticker[1]
newsticker[2]上にスクロール
newsticker[3]左へスクロール
newsticker[4]左へスクロール
Cycle Plugin(+ Easing Plugin)
Coin Slider
スライダー[1]下にサムネイル画像
スライダー[2]右にサムネイル画像
スライダー[3]左右矢印 下にコントロールあり
スライダー[4]左右矢印 下にコントロールなし
スライダー[5]左右矢印 下にコントロールあり(stop付き)
スライダー[6]画像外の左右矢印
スライダー[7]自動切り替え
スライダー[8]自動切り替え
スライダー[9]自動切り替え
css3[transition]
リストとグリッド切り替え表示する[javascript-cssデザイン]
Marquee jQuery[上にスクロール]
DD_belatedPNGの使い方[透過処理PNG]
ナビボタンのロールオーバー[CSS]
ナビボタンのロールオーバー[JS(jQuery)]
ナビボタンのロールオーバー[JS滑らかに切り替わる]
PHPで画像認証をする
広告をブログに張る[クリック課金]
∟忍者AdMax
∟グーグルAdSense
レンタルサーバ・VPS情報
ポイントサイト情報
アドネットワーク情報
無料のアクセス解析ツール(オープンソース等)
無料アクセス解析の導入
ブログランキングサイト一覧
sitemap.xmlを作成する
SEO対策 Google AdWords(キーワードツール)
SEO対策 SEOTOOLS
SEO対策 SEOチェキ