<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>obelisk2</author_name>
  <author_url>https://blog.hatena.ne.jp/obelisk2/</author_url>
  <blog_title>Camera Obscura</blog_title>
  <blog_url>https://obelisk.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
    <anon>かんたんコーディング</anon>
  </categories>
  <description>特定の年と月を指定して、カレンダーを出力するプログラムを書いてみました。標準添付ライブラリの Date クラスを使ってはつまらないので、自力で計算しました。 calender.rb month_table = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] #うるう年か？ is_uruu = -&gt;(year) { (year % 4 == 0 &amp;&amp; year % 100 != 0) || year % 400 == 0 } #西暦1年1月1日から何日目か（すべてグレゴリオ暦で計算） days = -&gt;(year, month, day) …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fobelisk.hatenablog.com%2Fentry%2F2018%2F03%2F25%2F233208&quot; title=&quot;Ruby でカレンダーを出力してみた - Camera Obscura&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>2018-03-25 23:32:08</published>
  <title>Ruby でカレンダーを出力してみた</title>
  <type>rich</type>
  <url>https://obelisk.hatenablog.com/entry/2018/03/25/233208</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
