'ArgumentError: bad value for range' for range of Times

D

David Bird

Hi,

When using the calendar_date_select plugin, Rails kept throwing an
ArgumentError: 'bad value for range', but only on Windows (fine on
OSX). Playing around in the console I get...
=> Tue Jun 23 19:12:11 +1000 1970..Tue Jun 23 19:12:11 +1000 1998
ArgumentError: bad value for range

Any ideas?

Thanks
 
T

Tiago Macedo

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Just guessing:

39 years ago is before 1970, I believe there is some sort of problem in
Windows with dates prior to 1970.

David Bird wrote:
| Hi,
|
| When using the calendar_date_select plugin, Rails kept throwing an
| ArgumentError: 'bad value for range', but only on Windows (fine on
| OSX). Playing around in the console I get...
|
|>> 38.years.ago..10.years.ago
| => Tue Jun 23 19:12:11 +1000 1970..Tue Jun 23 19:12:11 +1000 1998
|
|>> 39.years.ago..10.years.ago
| ArgumentError: bad value for range
|
| Any ideas?
|
| Thanks
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhfkmAACgkQxFuRTtCTMvL5zACeLzqreWeBlZUyg2Q5zYo6d6aA
fBkAn2OrUIJhVNvoYkXlf7Cg1/F90Nz6
=htFN
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top