<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>thr3a</author_name>
  <author_url>https://blog.hatena.ne.jp/thr3a/</author_url>
  <blog_title>動かざることバグの如し</blog_title>
  <blog_url>https://blog.turai.work/</blog_url>
  <categories>
    <anon>ruby</anon>
  </categories>
  <description>環境 ruby 2.4 やりたいこと 業務処理とか書いてて、特定の日が出勤日かどうか判別したい時がある。 ここでいう出勤日というのは 月曜日〜金曜日 勤労感謝の日とか元旦とかの定められた祝日ではない を指す。 それをtrue/falseで返してくれるメソッドがほしい コード さすがRuby専用のGemがあった。 holiday-jp/holiday_jp-ruby: Japanese holiday. が、あくまで祝日かどうかしか見ないのでDateクラスから直接叩けるようにカスタマイズした Gemfileに以下を追加して gem &quot;holiday_jp&quot; で、bundle installすれば…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.turai.work%2Fentry%2F20180822%2F1534921586&quot; title=&quot;Rubyで特定の日が祝日かどうかを判別するメソッド - 動かざることバグの如し&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-08-22 16:06:26</published>
  <title>Rubyで特定の日が祝日かどうかを判別するメソッド</title>
  <type>rich</type>
  <url>https://blog.turai.work/entry/20180822/1534921586</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
