SerialDate MINIMUM_YEAR_SUPPORTED question
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: SerialDate MINIMUM_YEAR_SUPPORTED question
It probably wouldn't be hard to make SerialDate go further back in time, just by using negative values. The first problem you'd run into is how to handle the screwy dates in the 1700's when the calendars changed around, but then you're only looking to support dates from the 1800's so that wouldn't matter. I'll probably take a look at this in the next week or two, because it is a dumb limitation.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


Re: SerialDate MINIMUM_YEAR_SUPPORTED question
Would be great if you could have a look at it. I'll get the sources and play around with SerialDate as well, maybe I can provide a patch.
Thanks,
Tom
Thanks,
Tom
Re: SerialDate MINIMUM_YEAR_SUPPORTED question
We too are seeing the same problem. Basically if you create a Millisecond object with an older date you get the problem:
The 'year' argument must be in range 1900 to 9999.
java.lang.IllegalArgumentException: The 'year' argument must be in range 1900 to 9999.
at org.jfree.date.SpreadsheetDate.<init>(SpreadsheetDate.java:114)
at org.jfree.date.SerialDate.createInstance(SerialDate.java:795)
at org.jfree.data.time.Day.<init>(Day.java:193)
at org.jfree.data.time.Millisecond.<init>(Millisecond.java:183)
at org.jfree.data.time.Millisecond.<init>(Millisecond.java:151)
I believe we are running with the latest release from April 20, 2009
Any ideas for a workaround?
Thanks,
jeff
The 'year' argument must be in range 1900 to 9999.
java.lang.IllegalArgumentException: The 'year' argument must be in range 1900 to 9999.
at org.jfree.date.SpreadsheetDate.<init>(SpreadsheetDate.java:114)
at org.jfree.date.SerialDate.createInstance(SerialDate.java:795)
at org.jfree.data.time.Day.<init>(Day.java:193)
at org.jfree.data.time.Millisecond.<init>(Millisecond.java:183)
at org.jfree.data.time.Millisecond.<init>(Millisecond.java:151)
I believe we are running with the latest release from April 20, 2009
Any ideas for a workaround?
Thanks,
jeff