kartikprabhu/mf2py — pull request #39 by kylewm (2014-05-14 06:21:19+00:00)
Title: Bugfix for nested datetimes & Implied date for dt-* properties

This is a two-parter, both necessary to correctly process

http://indiewebcamp.com/User:Gregorlove.com/sandbox

Part 1, value-class-pattern was slightly broken for cases like
```
19:30 -0600
```
because BS4's Tag.string attribute would return None. replaced the call with Tag.get_text() and it works.

Part 2, According to http://microformats.org/wiki/value-class-pattern#microformats2_parsers, if a dt-* property omits the date, we should use the most recent date. This handles the case where an event as dt-start=datetime and dt-end=time, without special-casing for specific property names. I added a private member variable to Parser: `_default_date` to track the current date.

Note: the spec also says that if there was no previously parsed date, we should use the *next* date. This is sufficiently difficult that I think we should wait until we see at least one example in the wild.

cc: @gregorlove, @barnabywalters