<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>beatdjam</author_name>
  <author_url>https://blog.hatena.ne.jp/beatdjam/</author_url>
  <blog_title>B-Teck!</blog_title>
  <blog_url>https://blog.beatdjam.com/</blog_url>
  <categories>
    <anon>JavaScript</anon>
  </categories>
  <description>正規表現でチェックして欲しい形式以外をふるいにかけた後、 Date型に突っ込んで突っ込む前と同じ年月日かを確認する。 これで欲しい形式以外は入ってこないし、変な日付が入ってきて無理やり変換されても 変換前との比較で判定できる。 別の形式も許容する場合は、isNaN()とか入れる必要があると思う。 function isDate(strDate){ // 空文字は無視 if(strDate == &quot;&quot;){ return true; } // 年/月/日の形式のみ許容する if(!strDate.match(/^\d{4}\/\d{1,2}\/\d{1,2}$/)){ return false; …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.beatdjam.com%2Fentry%2F2017%2F07%2F28%2F181201&quot; title=&quot;【JavaScript】日付の妥当性をチェックする - B-Teck!&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>2017-07-28 18:12:01</published>
  <title>【JavaScript】日付の妥当性をチェックする</title>
  <type>rich</type>
  <url>https://blog.beatdjam.com/entry/2017/07/28/181201</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
