<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hashibamiakira</author_name>
  <author_url>https://blog.hatena.ne.jp/hashibamiakira/</author_url>
  <blog_title>はしばみあきら blog</blog_title>
  <blog_url>https://hashibamiakira.hatenadiary.com/</blog_url>
  <categories>
    <anon>Ruby on Rails</anon>
    <anon>Ruby</anon>
  </categories>
  <description>昨日、今月１ヶ月の表示をするカレンダーを作成しました。 今回は、今月から見て翌月や先月、またはさらにその先の配列を取得できるようにしていきます。 前回のコードに付け足していくので、もしよかったらそちらもご覧下さい。 【Rails】【Ruby】Dateを使って今月の日数を配列にして表示 月や週を切り替える 最初にどうやって実装しようか？を考えます。 今回はviewに翌月、前月に移動するリンクを作成し、クリックによってパラメータを変化させ、その分だけ移動させるようにします。 完成形はこんな感じで まずは翌月、前月のリンクを作ります。 span = link_to &quot;Prev&quot;, workdays_…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhashibamiakira.hatenadiary.com%2Fentry%2F2020%2F12%2F17%2F175526&quot; title=&quot;【Ruby】【Rails】自作カレンダーで、月や週を切り替える - はしばみあきら blog&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-12-17 17:55:26</published>
  <title>【Ruby】【Rails】自作カレンダーで、月や週を切り替える</title>
  <type>rich</type>
  <url>https://hashibamiakira.hatenadiary.com/entry/2020/12/17/175526</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
