<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>g08m11</author_name>
  <author_url>https://blog.hatena.ne.jp/g08m11/</author_url>
  <blog_title>Web + Life Hack</blog_title>
  <blog_url>https://g08m11.hateblo.jp/</blog_url>
  <categories>
    <anon>rails</anon>
    <anon>ruby</anon>
  </categories>
  <description>年齢を表示する時にやったことを書きたいと思います。単純にdate型、time型で合わせての引き算だと値がおかしいことになっていました。 2.0.0p247 :036 &gt;g08m11.birthday.class =&gt; Time 2.0.0p247 :034 &gt; (DateTime.now - 5.year) - DateTime.now =&gt; (-19720800075541/10800000000) 2.0.0p247 :035 &gt; Time.now -g08m11.birthday =&gt; 891350514.378596 それを踏まえた上で、以下のような実装になりました。 2.0.0p24…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fg08m11.hateblo.jp%2Fentry%2F2014%2F01%2F08%2F014519&quot; title=&quot;【ruby】【rails】rubyで年齢を出力する方法 - Web + Life Hack&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>2014-01-08 01:45:19</published>
  <title>【ruby】【rails】rubyで年齢を出力する方法</title>
  <type>rich</type>
  <url>https://g08m11.hateblo.jp/entry/2014/01/08/014519</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
