{"id":2863,"date":"2015-01-02T11:12:27","date_gmt":"2015-01-02T02:12:27","guid":{"rendered":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/?p=2863"},"modified":"2015-01-02T12:30:42","modified_gmt":"2015-01-02T03:30:42","slug":"php%e3%81%a7%e3%81%ae%e6%9c%88%e6%9c%80%e7%b5%82%e6%97%a5%e5%8f%96%e5%be%97","status":"publish","type":"post","link":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/2015\/01\/02\/2863\/","title":{"rendered":"PHP\u3067\u306e\u6708\u6700\u7d42\u65e5\u53d6\u5f97"},"content":{"rendered":"<p>\u73fe\u5728\u6708\u306e\u6700\u7d42\u65e5\u306e\u53d6\u5f97\uff08t\uff08\u305d\u306e\u6708\u306e\u65e5\u6570\uff09\u3092\u6307\u5b9a\u3059\u308b\uff09<\/p>\n<div class=\"hl-surround\" style=\"height:16.8px;\"><div class=\"hl-main\"><pre>&lt;?php echo date(&quot;t&quot;);<\/pre><\/div><\/div>\n<p>\u4efb\u610f\u5e74\u6708\u306e\u6700\u7d42\u65e5\u306e\u53d6\u5f97\uff08mktime()\u306b\u6708,\u5e74\u3092\u6307\u5b9a\uff09<\/p>\n<div class=\"hl-surround\" style=\"height:16.8px;\"><div class=\"hl-main\"><pre>&lt;?php $y=2015; $m=1; echo date(&quot;t&quot;, mktime(0, 0, 0, $m, 1, $y));<\/pre><\/div><\/div>\n<p>\u4efb\u610f\u5e74\u6708\u306e\u6700\u7d42\u65e5\u306e\u53d6\u5f97\uff08d\u3092\u6307\u5b9a\u3057\u3001mktime()\u3067\u7fcc\u6708\u3068\u65e5\u30920\u3068\u6307\u5b9a\u3057\u3066\u524d\u6708\u306e\u672b\u65e5\u306b\uff09<\/p>\n<div class=\"hl-surround\" style=\"height:16.8px;\"><div class=\"hl-main\"><pre>&lt;?php $y=2015; $m=1; echo date(&quot;d&quot;, mktime(0, 0, 0, $m+1, 0, $y));<\/pre><\/div><\/div>\n<p>\u307e\u305f\u306fstrtotime()\u3067&#8221;last day of \u5e74-\u6708&#8221;\u3092\u4f7f\u3063\u3066<\/p>\n<div class=\"hl-surround\" style=\"height:16.8px;\"><div class=\"hl-main\"><pre>&lt;?php $y=2015; $m=1; echo date(&quot;d&quot;, strtotime(&quot;last day of $y-$m&quot;));<\/pre><\/div><\/div>\n<p>\u6307\u5b9a\u306bt\u3092\u4f7f\u3046\u306a\u3089\u4ee5\u4e0b\u3067\u3082\u53ef\u80fd<\/p>\n<div class=\"hl-surround\" style=\"height:16.8px;\"><div class=\"hl-main\"><pre>&lt;?php $y=2015; $m=1; echo date(&quot;t&quot;, strtotime(&quot;$y-$m&quot;));<\/pre><\/div><\/div>\n<p><strong>\u30ea\u30f3\u30af<\/strong><\/p>\n<ul>\n<li><a href=\"http:\/\/qiita.com\/akase244\/items\/e6c4835648a4e9a8678f\">PHP\u3067\u6708\u672b\u65e5\u3092\u53d6\u5f97\u3059\u308b &#8211; Qiita<br \/>\n<\/a><\/p>\n<li><a href=\"http:\/\/qiita.com\/HamaTech\/items\/20b37b614ef84fb3197c\">PHP\u3067\u6307\u5b9a\u6708\u306e\u6708\u521d\u3068\u6708\u672b\u306e\u65e5\u4ed8\u3092\u53d6\u5f97 &#8211; Qiita<br \/>\n<\/a><\/p>\n<li><a href=\"http:\/\/www.hachi-log.com\/php-date-month\/\">[PHP] date()\u95a2\u6570\u3092\u4f7f\u3063\u3066\u300c\u6708\u521d\u300d\u300c\u6708\u672b\u300d\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5 | \u30cf\u30c1\u30ed\u30b0<br \/>\n<\/a><\/p>\n<li><a href=\"http:\/\/mtanabe.com\/tips.php?tips_id=56\">\u7279\u5b9a\u306e\u5e74\u6708\u306e\u6700\u7d42\u65e5\u3092\u53d6\u5f97\u3059\u308b\u3002 \uff5e PHP \u305d\u306e\u4ed6 &#8211; Office Tanabe<br \/>\n<\/a><\/p>\n<li><a href=\"http:\/\/d.hatena.ne.jp\/steel-plate\/20080113\/1201454759\">PHP\u3067\u6708\u306e\u6700\u7d42\u65e5\u306e\u53d6\u5f97 &#8211; \u50d5\u306e\u30b9\u30b9\u30e1\u3002<br \/>\n<\/a><\/p>\n<li><a href=\"http:\/\/php-beginner.com\/function\/datetime\/mktime.html\">PHP\u95a2\u6570\u8b1b\u5ea7\uff1amktime | \u305d\u3075\u3043\u306ephp\u5165\u9580<br \/>\n<\/a><\/p>\n<li><a href=\"http:\/\/php.net\/manual\/ja\/function.mktime.php\">PHP: mktime &#8211; Manual<br \/>\n<\/a><\/p>\n<li><a href=\"http:\/\/php.net\/manual\/ja\/datetime.formats.relative.php\">PHP: \u76f8\u5bfe\u7684\u306a\u66f8\u5f0f &#8211; Manual<br \/>\n<\/a>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u73fe\u5728\u6708\u306e\u6700\u7d42\u65e5\u306e\u53d6\u5f97\uff08t\uff08\u305d\u306e\u6708\u306e\u65e5\u6570\uff09\u3092\u6307\u5b9a\u3059\u308b\uff09 &lt;?php echo date(&quot;t&quot;); \u4efb\u610f\u5e74\u6708\u306e\u6700\u7d42\u65e5\u306e\u53d6\u5f97\uff08mktime()\u306b\u6708,\u5e74\u3092\u6307\u5b9a\uff09 &lt;?php $y=2015; $ [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[351,352,60,353],"_links":{"self":[{"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/posts\/2863"}],"collection":[{"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/comments?post=2863"}],"version-history":[{"count":5,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/posts\/2863\/revisions"}],"predecessor-version":[{"id":2868,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/posts\/2863\/revisions\/2868"}],"wp:attachment":[{"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/media?parent=2863"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/categories?post=2863"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/tags?post=2863"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}