Respec: RangeError: date value is not finite in DateTimeFormat.format()

Created on 12 Aug 2017  Â·  4Comments  Â·  Source: w3c/respec

Spec: https://w3c.github.io/html-media-capture/?specStatus=CR;previousMaturity=CR;previousPublishDate=2017-05-04/;crEnd=2017-06-27;publishDate=2017-08-24

Web Console in Firefox DevTools emits the following error:

RangeError: date value is not finite in DateTimeFormat.format()
Stack trace:
e.concatDate@https://www.w3.org/Tools/respec/respec-w3c-common:1:63216
e.run@https://www.w3.org/Tools/respec/respec-w3c-common:1:357180
i/<@https://www.w3.org/Tools/respec/respec-w3c-common:1:67755
n@https://www.w3.org/Tools/respec/respec-w3c-common:1:32665
l/<@https://www.w3.org/Tools/respec/respec-w3c-common:1:33784
o/</e[t]@https://www.w3.org/Tools/respec/respec-w3c-common:1:32841
r@https://www.w3.org/Tools/respec/respec-w3c-common:1:67094
i/</<@https://www.w3.org/Tools/respec/respec-w3c-common:1:67245
i/<@https://www.w3.org/Tools/respec/respec-w3c-common:1:67042
a/</</<@https://www.w3.org/Tools/respec/respec-w3c-common:1:68065
a/<@https://www.w3.org/Tools/respec/respec-w3c-common:1:67362
e/<@https://www.w3.org/Tools/respec/respec-w3c-common:1:68680
n@https://www.w3.org/Tools/respec/respec-w3c-common:1:32665
l/<@https://www.w3.org/Tools/respec/respec-w3c-common:1:33784
o/</e[t]@https://www.w3.org/Tools/respec/respec-w3c-common:1:32841
r@https://www.w3.org/Tools/respec/respec-w3c-common:1:67094
r/<@https://www.w3.org/Tools/respec/respec-w3c-common:1:67198
  respec-w3c-common:1:68755

Linter (no-headingless-sections): All sections must start with a `h2-6` element. <section id="sotd" class="respec-offending-element">  respec-w3c-common:1:180109

All sections must start with a `h2-6` element. Add a `h2-6` to the offending section or use a `<div>`. See developer console. ("no-headingless-sections" x 1)  respec-w3c-common:1:32456

  • Firefox version: 54.0.1 (64-bit)
  • OS: macOS 10.12.6

Most helpful comment

Safari doesn't support - date separator and instead it looks for / separator so you can simply add a regex to swap that at the end like this:

console.log (new Date('2011-04-12'.replace(/-/g, "/")));

All 4 comments

The "/" after 04 in previousPublishedDate seems to cause the error (as it makes the date malformed).

Try:
https://w3c.github.io/html-media-capture/?specStatus=CR;previousMaturity=CR;previousPublishDate=2017-05-04;crEnd=2017-06-27;publishDate=2017-08-24

On Aug 12, 2017, at 9:36 AM, Fuqiao Xue notifications@github.com wrote:

Spec: https://w3c.github.io/html-media-capture/?specStatus=CR;previousMaturity=CR;previousPublishDate=2017-05-04/;crEnd=2017-06-27;publishDate=2017-08-24

Web Console in Firefox DevTools emits the following error:

RangeError: date value is not finite in DateTimeFormat.format()
Stack trace:
e.concatDate@https://www.w3.org/Tools/respec/respec-w3c-common:1:63216
e.run@https://www.w3.org/Tools/respec/respec-w3c-common:1:357180
i/<@https://www.w3.org/Tools/respec/respec-w3c-common:1:67755
n@https://www.w3.org/Tools/respec/respec-w3c-common:1:32665
l/<@https://www.w3.org/Tools/respec/respec-w3c-common:1:33784
o/https://www.w3.org/Tools/respec/respec-w3c-common:1:32841
r@https://www.w3.org/Tools/respec/respec-w3c-common:1:67094
i/https://www.w3.org/Tools/respec/respec-w3c-common:1:67245
i/<@https://www.w3.org/Tools/respec/respec-w3c-common:1:67042
a/https://www.w3.org/Tools/respec/respec-w3c-common:1:68065
a/<@https://www.w3.org/Tools/respec/respec-w3c-common:1:67362
e/<@https://www.w3.org/Tools/respec/respec-w3c-common:1:68680
n@https://www.w3.org/Tools/respec/respec-w3c-common:1:32665
l/<@https://www.w3.org/Tools/respec/respec-w3c-common:1:33784
o/https://www.w3.org/Tools/respec/respec-w3c-common:1:32841
r@https://www.w3.org/Tools/respec/respec-w3c-common:1:67094
r/<@https://www.w3.org/Tools/respec/respec-w3c-common:1:67198
respec-w3c-common:1:68755

Linter (no-headingless-sections): All sections must start with a h2-6 element.

respec-w3c-common:1:180109

All sections must start with a h2-6 element. Add a h2-6 to the offending section or use a <div>. See developer console. ("no-headingless-sections" x 1) respec-w3c-common:1:32456
Firefox version: 54.0.1 (64-bit)
OS: macOS 10.12.6
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Working on a patch to gracefully handle the errors, and have ReSpec yell about invalid dates.

I see. Thanks for the hint!

Safari doesn't support - date separator and instead it looks for / separator so you can simply add a regex to swap that at the end like this:

console.log (new Date('2011-04-12'.replace(/-/g, "/")));
Was this page helpful?
0 / 5 - 0 ratings

Related issues

marcoscaceres picture marcoscaceres  Â·  5Comments

deniak picture deniak  Â·  5Comments

greenkeeper[bot] picture greenkeeper[bot]  Â·  4Comments

marcoscaceres picture marcoscaceres  Â·  3Comments

sidvishnoi picture sidvishnoi  Â·  4Comments