xue35 / TCX.jl

TCX parses TCX/XML sports file.
MIT License
1 stars 2 forks source link

Allows for a greater number of datetime strings to be parsed #21

Closed brotherjack closed 3 years ago

brotherjack commented 4 years ago

I ran into an error (referenced in issue #19), where a datetime string caused an error in parsing when the number of millisecond digits was 2 instead of 3. I've altered the program to allow for datetime strings with up to 3 millisecond digits.

brotherjack commented 4 years ago

OK, while Travis is finally satisfied, there is the issue of this PR straying a bit from it original intent. In addition to fixing the issue with the trailing 'Z', or at least working around it anyway, there is some additional refactoring done. I changed the "magic numbers" to constants, and I also refactored the parse_tcx_file quite a bit as I added a parse_tcx_string (I'm working on a project that downloads from Dropbox and that became useful).

I understand this might be a bit much, but if you're OK with the changes I don't see this as being an issue in that case. @xue35 can you tell me what you think when you have the time? I can rebase this to condense the commits or remove certain changes, if you would like me to.

xue35 commented 3 years ago

Thanks @brotherjack for this PR. Merged.