Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

value-class-pattern parsing does not handle timezone in separate element #73

Closed
sknebel opened this issue May 30, 2017 · 0 comments
Closed

Comments

@sknebel
Copy link
Member

sknebel commented May 30, 2017

(See also microformats/php-mf2#126 for the same bug in php-mf2)

The following snippet has date, time and timezone offset in three different elements, using the value-class-pattern.

<div class="h-event">
 <span class="e-summary">HomebrewWebsiteClub Berlin</span> will be next on 
 <span class="dt-start">
  <span class="value">2017-05-31</span>, from
  <span class="value">19:00</span> (UTC<span class="value">+02:00</span>)
</span> to  <span class="dt-end">21:00</span>.</div>

I would have expected a value of 2017-05-31 19:00+02:00 for start, per http://microformats.org/wiki/value-class-pattern#Date_and_time_parsing

[…] the parser assembles the overall datetime value by concatenating the specific date, " " (space character) and specific time (if time was specified, with 00 minutes implied if no minutes are provided), and specific timezone (if timezone and a specific time was specified)

Instead the timezone is dropped:

"start": [ "2017-05-31 19:00" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant