<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mofmof-inc</author_name>
  <author_url>https://blog.hatena.ne.jp/mofmof-inc/</author_url>
  <blog_title>もふもふ技術部</blog_title>
  <blog_url>https://www.mof-mof.co.jp/tech-blog/</blog_url>
  <categories>
    <anon>JavaScript</anon>
    <anon>date-fns</anon>
  </categories>
  <description>JavaScriptを使ってフロントエンドで日付操作をする事って結構あると思いますが、Dateオブジェクトを使うとクセが強すぎて意図しない動きになったりしますよね。 最近会社のプロジェクトで日付操作をDateオブジェクトを使っていて悲鳴をあげてたんですが、date-fnsという便利ライブラリを知って一気に幸せになったので、今回はその幸せを皆さんにもお裾分けしていきたいと思います。 Dateオブジェクトの何が辛い？ 月は0から始まる事 JavaScriptの世界では月は0〜11で表します。 例えば2020年5月29日を取得したい時、下記のように書きます。getMonthで月を取得するときも同様に…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.mof-mof.co.jp%2Ftech-blog%2Fdate-fns&quot; title=&quot;【超便利】JavaScript日付ライブラリ・date-fns - もふもふ技術部&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-05-29 00:00:00</published>
  <title>【超便利】JavaScript日付ライブラリ・date-fns</title>
  <type>rich</type>
  <url>https://www.mof-mof.co.jp/tech-blog/date-fns</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
