Problem:
I create a weekly BasicTimeSeries, then I add the following:
BasicTimeSeries series = new BasicTimeSeries("s1", Week.class);
Calendar calendar = Calendar.getInstance();
calendar.set(1994, Calendar.DECEMBER, 24);
series.add(new Week(Calendar.getTime()), 55.5);
calendar.set(1994, Calendar.DECEMBER, 31);
series.add(new Week(Calendar.getTime()), 44.4);
then I got an error.
Reason:
The date 1994-12-31 is week 53. When create a new Week for this day, it changes the number of week to 52, then it thinks duplicated date is being added.
How can solve this problem? Thanks!
problem with weekly BasicTimeSeries
Re: problem with weekly BasicTimeSeries
I'm not sure that there is a good answer for this. Perhaps I'll modify the Week class to recognise that there is a 'Week 53', but that it is only 1 day (or 2 days in a leap year) long. Any other suggestions?
Regards,
DG.
Regards,
DG.