Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > 'ArgumentError: bad value for range' for range of Times

Reply
Thread Tools

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

 
 
David Bird
Guest
Posts: n/a
 
      06-23-2008
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
 
Reply With Quote
 
 
 
 
Tiago Macedo
Guest
Posts: n/a
 
      06-23-2008
-----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

iEYEARECAAYFAkhfkmAACgkQxFuRTtCTMvL5zACeLzqreWeBlZ Uyg2Q5zYo6d6aA
fBkAn2OrUIJhVNvoYkXlf7Cg1/F90Nz6
=htFN
-----END PGP SIGNATURE-----

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
integer >= 1 == True and integer.0 == False is bad, bad, bad!!! rantingrick Python 44 07-13-2010 06:33 PM
Bad media, bad files or bad Nero? John Computer Information 23 01-08-2008 09:17 PM
ActiveX apologetic Larry Seltzer... "Sun paid for malicious ActiveX code, and Firefox is bad, bad bad baad. please use ActiveX, it's secure and nice!" (ok, the last part is irony on my part) fernando.cassia@gmail.com Java 0 04-16-2005 10:05 PM
24 Season 3 Bad Bad Bad (Spoiler) nospam@nospam.com DVD Video 12 02-23-2005 03:28 AM
24 Season 3 Bad Bad Bad (Spoiler) nospam@nospam.com DVD Video 0 02-19-2005 01:10 AM



Advertisments