Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Timecop has no effect when parsing Dates #59

Closed
quidproquo opened this Issue · 1 comment

2 participants

@quidproquo

When I do the following:

Timecop.travel(Date.parse('Dec 15, 2012')
d = Date.parse('Dec 15')
d == Date.parse('Dec 15, 2013')

parse just assumes it is current real year.

Any way to fix or advice? I wouldn't mind putting in a pull request, though not sure where to start.

Thanks,
Ilya

@jtrupiano
Collaborator

Date#parse is implemented by Ruby stdlib's Date class. http://www.ruby-doc.org/stdlib-1.9.3/libdoc/date/rdoc/Date.html#method-c-parse

You would need to patch its behavior there.

@jtrupiano jtrupiano closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.