Skip to content
New issue

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

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

Already on GitHub? # to your account

h-event time test should not normalise timezone -v2 #29

Closed
kylewm opened this issue Jun 10, 2015 · 9 comments
Closed

h-event time test should not normalise timezone -v2 #29

kylewm opened this issue Jun 10, 2015 · 9 comments

Comments

@kylewm
Copy link
Contributor

kylewm commented Jun 10, 2015

in microformats-v2/h-event/time.html

<span class="h-event">
    <span class="p-name">The 4th Microformat party</span> will be on 
    <ul>
        <li class="dt-start">
            <time class="value" datetime="2009-06-26">26 July</time>, from
            <time class="value">19:00:00-08:00</time> 
        </li>
        <li class="dt-start">
            <time class="value" datetime="2009-06-26">26 July</time>, from
            <time class="value">19:00:00-0800</time> 
        </li>
...

the output reads

"start": ["2009-06-26T19:00:00-0800", "2009-06-26T19:00:00-0800"...

with the colon removed from the first timezone. There is an issue discussing normalisation, but for now http://microformats.org/wiki/value-class-pattern#Date_and_time_parsing seems to indicate the colon should be preserved.

@glennjones
Copy link
Member

Yes your right. My parser is been a bit too clever and normalising dates. I am using ISO 8601 date "profiles" which are like a set of sub rules that restrict the ISO 8601. The default profile drops colon from timezone.

The tests needs changing and I need to add a flag for "date normalisation" which is switch off by default. Unless of cause we add date normalisation to parsing rules : )

I will do this in next round of updates

@kylewm
Copy link
Contributor Author

kylewm commented Jun 10, 2015

Normalizing is a proposal, I have it implemented and commented out in
mf2py. Happy to pursue that route instead if you prefer

@kylewm kylewm mentioned this issue Jun 11, 2015
@glennjones
Copy link
Member

The tests now do NOT normalising dates as per current parsing rules. Leave this issue open while normalising dates is discussed.

@willnorris
Copy link
Contributor

@tantek recently resolved http://microformats.org/wiki/microformats2-parsing-issues#parsing_a_dt-_property. It seemed to be mainly focused on normalizing dates with regards to space vs "T" as a separator and removal of implying 00 seconds. However, the vcp page is also now pretty clear that a resulting dt value should not have colons in the timezone.

@dissolve
Copy link
Contributor

dissolve commented May 8, 2017

h-event/dates example is normalizing to add the colons still.

@gRegorLove
Copy link
Member

gRegorLove commented Jul 22, 2018

Parsing for h-event/dates.html test doesn't use VCP, so it's expected to return the datetime attribute without normalization. There's a discussion about changing that (microformats/microformats2-parsing#12), but until that's resolved I think we can close this issue.

Edit: realized the OP is about a different test; my comment here was only about previous comment for h-event/dates

@jalcine
Copy link

jalcine commented Jun 19, 2022

Nudging this because this test is the only v2 test that's failing for the Rust library. Should we opt to keep (current behavior expected in the Rust library), preserve as authored, or drop the colon in offsets?

(Originally published at: https://jacky.wtf/2022/6/kduV)

@gRegorLove
Copy link
Member

gRegorLove commented Jun 24, 2022

Specification updated (microformats/microformats2-parsing#56) to normalize by removing colon in timezone offset, so these tests can be updated accordingly. Note this only applies to VCP for now; see separate issue microformats/microformats2-parsing#12

@gRegorLove
Copy link
Member

I reviewed the master branch and confirmed that 17d31db normalized the test outputs, so no additional test updates are needed to resolve this issue.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants