{"provider_name":"Hatena Blog","provider_url":"https://hatena.blog","blog_url":"https://gouf.hatenablog.com/","author_url":"https://blog.hatena.ne.jp/innocent-zero/","categories":["Q&A","Ruby"],"url":"https://gouf.hatenablog.com/entry/2020/11/06/201722","version":"1.0","author_name":"innocent-zero","title":"Q. \u300c\u6708\u672b\u306e45\u65e5\u5f8c\u300d\u3063\u3066 \u3044\u3064?","published":"2020-11-06 20:17:22","image_url":null,"height":"190","width":"100%","blog_title":"\u30d6\u30ed\u30b0","type":"rich","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgouf.hatenablog.com%2Fentry%2F2020%2F11%2F06%2F201722\" title=\"Q. \u300c\u6708\u672b\u306e45\u65e5\u5f8c\u300d\u3063\u3066 \u3044\u3064? - \u30d6\u30ed\u30b0\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","description":"A. \u6b21\u306e\u30b3\u30fc\u30c9\u3067\u78ba\u8a8d\u3067\u304d\u308b require 'active_support' require 'active_support/core_ext' Date.new(2021, 4, 1).end_of_month.advance(days: 45).to_s # => \"2021-06-14\" irb \u3084 pry \u3067\u6253\u3061\u8fbc\u3080\u3068\u3001\u3059\u3050\u306b\u78ba\u8a8d\u3067\u304d\u308b \u652f\u6255\u3044\u30b5\u30a4\u30c8\u306e\u8a08\u7b97\u304c\u7c21\u5358\u306b\u306a\u3063\u305f!! Links rails/activesupport at master \u00b7 rails/rails DateAndTime::Calculations#end_of_month - Ruby on Rails A\u2026"}