Skip to content

Conversation

davispuh
Copy link
Collaborator

This PR implements correct Time parsing to allow subseconds (resolves #181).

All tests does pass and I added few more. I did rewrite time parsing logic as IMHO it wasn't good way and I think this is much better :)

This implementation allows to specify starting from 10th of a second (eg. 14:15:16.7) and up to microsecond precision (6 digits for subsecond part).

@leejarvis
Copy link
Collaborator

I like this. Thanks for the work, it looks much nicer. One thing, though.. could you change the camelCase variable names to use snake_case? Camel case variables in Ruby are rare and I think they're messy (especially as everything else is snake case) I also think this exception should raise an ArgumentError and should have a test.

Apart from that, this looks great.

@davispuh
Copy link
Collaborator Author

Done!
I'm just used to camelCase and for that exception I followed previous code like it was, but improved now ;)

@davispuh
Copy link
Collaborator Author

hmm, seems there's merge conflict because @current_time from merged PR (ruby-warnings)

@leejarvis
Copy link
Collaborator

Could you rebase and squash your commits? I'll merge this in this afternoon. Thanks for the work!

On Tue, Jul 30, 2013 at 3:38 PM, Dāvis notifications@github.com wrote:

hmm, seems there's merge conflict because @current_time from merged PR (ruby-warnings)

Reply to this email directly or view it on GitHub:
#195 (comment)

davispuh added 3 commits July 30, 2013 17:44
* Improve Regexp for times in Repeater to allow subseconds
* Rewrite time parsing in repeater_time to a better way
* Add tests for times with subseconds
* Add example in README for time with microseconds
@davispuh
Copy link
Collaborator Author

I just did rebase before reading your reply. I think should be fine without squashing ;)

leejarvis added a commit that referenced this pull request Jul 30, 2013
Correctly parse time with subseconds
@leejarvis leejarvis merged commit e68d360 into mojombo:master Jul 30, 2013
@leejarvis
Copy link
Collaborator

💣 thanks!

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

Successfully merging this pull request may close these issues.

Milliseconds isn't parsed for other formats
2 participants