2010年06月01日 過去Blog
define( “ONE_DAY_SEC”, 24 * 3600 ); // 日付けの差分をとる関数 function dateDiff( $date1, $date2 ) { return ( strtotime( $date1 ) – strtotime( $date2 ) ) / ONE_DAY_SEC; } // 実行サンプル $date1 = date(‘Y/m/d’); $date2 = “2010/06/01”; $result = (dateDiff( $date1, $date2 )+1); これで$resultには、2010/06/01 から 現在の日付までの経過日数を求めることが出来る。 参考サイト:http://q.hatena.ne.jp/1169605670

この投稿へのコメント

コメントはまだありません。

コメントを残す

メールアドレスが公開されることはありません。

次のHTML タグと属性が使えます。
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CAPTCHA


ピックアップ記事

ドロップキャッチとは

2010年03月08日 過去Blog
ドロップキャッチとは (ドメインドロップキャッチ,drop catch,) ドロップキャッチとは、登録有効期限の切れたドメイン名を、再取得可能になったタイミングで取得することである。 ドメイン名は基本的に早い者勝ちであり、同じドメインを重複して取得することはできないが、登録有効期限の切れたドメイン名は一定期間の経過後に再度取得できるようになる。 たとえば、3文字程度の短い文字列や、魅力的な単語の…
「ドロップキャッチとは」をはてなブックマークに追加

htmlファイルでphpを動かすための.htaccessファイルの設定

2009年11月20日 過去Blog
htmlファイルでphpを動かすための.htaccessファイルの設定 .htaccessファイル内に以下の行を記述します。 AddType application/x-httpd-php .htm .html 当然の前提条件として、htaccessの動作が許可されているサーバに限ります。…
「htmlファイルでphpを動かすための.htaccessファイルの設定」をはてなブックマークに追加

php フォームのPOST送信で配列を扱う場合

2010年04月15日 過去Blog
htmlのフォーム内のcheckboxなどで、配列を扱いたい場合は、以下のように name 属性に [] をつけます。これで配列として扱えます。 <input type="checkbox" name="item[]" value=""> <input type="checkbox" name="item[]" value=""> <input type="checkbox" n…
「php フォームのPOST送信で配列を扱う場合」をはてなブックマークに追加

tabBar + navigationBar + tableView

2011年01月19日 過去Blog
http://www.edumobile.org/iphone/iphone-programming-tutorials/tabbarcontroller-with-navigationcontroller-and-tableview-in-iphone/ http://iphone-app-developer.seesaa.net/article/130194298.html house cl…
「tabBar + navigationBar + tableView」をはてなブックマークに追加

Ushahidi API の使用方法

2011年04月08日 過去Blog
http://wiki.ushahidi.com/doku.php?id=ushahidi_api(英語版) http://wiki.ushahidi.com/doku.php?id=ushahidi_api_jp (日本語版) web hosting reviews…
「Ushahidi API の使用方法」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy