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

Microformat datetime design pattern is different from what is being parsed #1

Open
GoogleCodeExporter opened this issue Mar 19, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. the datetime design pattern has dashes in the date
http://microformats.org/wiki/datetime-design-pattern 
2. Running js-hcalendar on a page that has the dtstart in the above format
fails to work properly

What is the expected output? What do you see instead?
js-hcalendar is unable to find the dtstart for the event.

What version of the product are you using? On what operating system?
Rel. 2007-Feb-01 running on FF2 & IE7 for WinXP

Please provide any additional information below.
I modified a line in parseDT(dt) to the following.
var result = dtText.match( /^(\d{4})-(\d{2})-(\d{2})/ );

Original issue reported on code.google.com by creuz...@gmail.com on 5 Mar 2007 at 5:04

@GoogleCodeExporter
Copy link
Author

Thanks for the report.  Can you attach your proposed patch as a diff (say, with 
"svn
diff")?

Original comment by dglasser on 5 Mar 2007 at 6:22

@GoogleCodeExporter
Copy link
Author

--- hcalendar.js.old    2007-09-13 15:21:57.000000000 +0200
+++ hcalendar.js        2007-09-13 15:21:00.000000000 +0200
@@ -139,7 +139,7 @@
   } else {
     dtText = dt.firstChild.data;
   }
-  var result = dtText.match( /^(\d{4})(\d{2})(\d{2})/ );
+  var result = dtText.match( /^(\d{4})-(\d{2})-(\d{2})/ );
   if (result == null) {
     debug("didn't recognize DT: " + dtText);
   }

Original comment by christoph.rauch@gmail.com on 13 Sep 2007 at 1:23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant