<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>engetu21</author_name>
  <author_url>https://blog.hatena.ne.jp/engetu21/</author_url>
  <blog_title>技術メモ</blog_title>
  <blog_url>https://engetu21.hatenablog.com/</blog_url>
  <categories>
    <anon>Python</anon>
    <anon>プログラム</anon>
  </categories>
  <description>import datetime from dateutil.relativedelta import relativedelta MONTH = &quot;202206&quot; LAST_MONTH = (datetime.datetime.strptime(MONTH,'%Y%m') + relativedelta(months=-1)).strftime(&quot;%Y%m&quot;) ■ポイント ・datetime.datetime.strptime(MONTH,'%Y%m') で第一引数の変数を対象に文字列→日付に変換。 第二引数はフォーマットを示す。 %YはYYYYで西暦4桁を示す。西暦2桁にしたい場合は%yとす…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fengetu21.hatenablog.com%2Fentry%2F2022%2F06%2F02%2F190000&quot; title=&quot;【Python3】文字列で管理されている年月(YYYYMM)から昨月を算出する例 - 技術メモ&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>2022-06-02 19:00:00</published>
  <title>【Python3】文字列で管理されている年月(YYYYMM)から昨月を算出する例</title>
  <type>rich</type>
  <url>https://engetu21.hatenablog.com/entry/2022/06/02/190000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
