{"id":198,"date":"2014-02-03T11:25:54","date_gmt":"2014-02-03T02:25:54","guid":{"rendered":"http:\/\/gomocool.net\/gomokulog\/?p=198"},"modified":"2014-12-13T14:23:24","modified_gmt":"2014-12-13T05:23:24","slug":"net-%e5%bd%93%e6%9c%88%e3%81%ae%e6%9c%ab%e6%97%a5%e3%82%92%e5%8f%96%e5%be%97","status":"publish","type":"post","link":"https:\/\/gomokulog.gomocool.net\/?p=198","title":{"rendered":"[.NET] \u5f53\u6708\u306e\u672b\u65e5\u3092\u53d6\u5f97"},"content":{"rendered":"<p>\u65e5\u4ed8\u95a2\u9023\u3092\u6271\u3046\u3068\u5272\u3068\u4f7f\u3046\u672b\u65e5\u53d6\u5f97<\/p>\n<p>.NET(C#\u3084VB.NET)\u3067\u306fDATE\u578b\u3068DATETIME\u578b\u306bDaysInMonth\u3068\u3044\u3046\u30e1\u30bd\u30c3\u30c9\u3067\u6307\u5b9a\u3057\u305f\u5e74\u3001\u6708\u306e\u65e5\u6570\u3092\u53d6\u5f97\u3059\u308b\u3002<br \/>\n<a href=\"http:\/\/msdn.microsoft.com\/ja-jp\/library\/system.datetime.daysinmonth%28v=vs.110%29.aspx?cs-save-lang=1&amp;cs-lang=csharp#code-snippet-1\">http:\/\/msdn.microsoft.com\/ja-jp\/library\/system.datetime.daysinmonth%28v=vs.110%29.aspx?cs-save-lang=1&amp;cs-lang=csharp#code-snippet-1<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>DaysInMonth\u3092\u4f7f\u3063\u3066\u3001\u5f53\u6708(\u4f8b\u3067\u306f\u672c\u65e5)\u3001\u5f53\u6708\u306e1\u65e5\u3001\u5f53\u6708\u306e\u672b\u65e5\u3092\u53d6\u5f97\u3057\u305f\u3044\u5834\u5408\u306f\u4e0b\u8a18\u306e\u3088\u3046\u306b\u306a\u308b\u3002<\/p>\n<p>C#<\/p>\n<pre class=\"lang:c# decode:true \">var today = DateTime.Now;\r\nvar firstDayInMonth = new DateTime(today.Year, today.Month, 1);\r\nvar lastDayInMonth = new DateTime(today.Year, today.Month, DateTime.DaysInMonth(today.Year, today.Month));<\/pre>\n<p>VB.NET<\/p>\n<pre class=\"lang:vbnet decode:true\" title=\"VB.NET\">Dim today As Date = Date.Now()\r\nDim firstDayInMonth As Date = New Date(today.Year, today.Month, 1)\r\nDim lastDayInMonth As Date = New Date(today.Year, today.Month, Date.DaysInMonth(today.Year, today.Month))<\/pre>\n<p>\u3057\u304b\u3057\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u306a\u3093\u3060\u304b\u3089\u3001\u4e0a\u306e\u56f3\u3067\u3044\u3046\u306a\u3089\u3001today.DaysInMonth() \u3068\u3044\u3063\u305f\u611f\u3058\u3067\u3001\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u3060\u3051\u3058\u3083\u306a\u304f\u3066\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30e1\u30bd\u30c3\u30c9\u3068\u3057\u3066\u4f7f\u3048\u305f\u3089\u3088\u308a\u3059\u3063\u304d\u308a\u3059\u308b\u6c17\u304c\u3059\u308b\u306e\u306f\u81ea\u5206\u3060\u3051\u3060\u308d\u3046\u304b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u65e5\u4ed8\u95a2\u9023\u3092\u6271\u3046\u3068\u5272\u3068\u4f7f\u3046\u672b\u65e5\u53d6\u5f97 .NET(C#\u3084VB.NET)\u3067\u306fDATE\u578b\u3068DATETIME\u578b\u306bDaysInMonth\u3068\u3044\u3046\u30e1\u30bd\u30c3\u30c9\u3067\u6307\u5b9a\u3057\u305f\u5e74\u3001\u6708\u306e\u65e5\u6570\u3092\u53d6\u5f97\u3059\u308b\u3002 http:\/\/msdn.microsoft.co&hellip;  <a href=\"https:\/\/gomokulog.gomocool.net\/?p=198\" class=\"more-link\">more <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[66],"tags":[30,64,34],"class_list":["post-198","post","type-post","status-publish","format-standard","hentry","category-dot-net","tag-dot-net","tag-csharp","tag-vb-net"],"_links":{"self":[{"href":"https:\/\/gomokulog.gomocool.net\/index.php?rest_route=\/wp\/v2\/posts\/198","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gomokulog.gomocool.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gomokulog.gomocool.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gomokulog.gomocool.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gomokulog.gomocool.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=198"}],"version-history":[{"count":3,"href":"https:\/\/gomokulog.gomocool.net\/index.php?rest_route=\/wp\/v2\/posts\/198\/revisions"}],"predecessor-version":[{"id":484,"href":"https:\/\/gomokulog.gomocool.net\/index.php?rest_route=\/wp\/v2\/posts\/198\/revisions\/484"}],"wp:attachment":[{"href":"https:\/\/gomokulog.gomocool.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gomokulog.gomocool.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=198"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gomokulog.gomocool.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}