16 July 2026

Problem with some leap years

The time series covers years 1980 through 2026.
Only 1988, 1992, 1996 and 2024 cause problems (some leap years).
In[]:=
dateslevel=
dateslevel
;(*arraywithdatesandwaterlevels.Therearenoduplicateddates*)
A continuous time series is created with TemporalRegularity False
In[]:=
tseriescontinuous=TimeSeries[dateslevel[[All,2]],{dateslevel[[All,1]]},TemporalRegularity->False]
Out[]=
TimeSeries
Time: Tue 1 Jan 1980 00:00:00 to Tue 14 Jul 2026 00:00:00 GMT-06:00
Length: 16196
Duration:
46
yr
6
mo
13
days

Now we create an array with a time series for each of the 47 years.
In[]:=
lastyear=2026;​​tseriesyearly=Table[​​TimeSeriesWindow[tseriescontinuous,{{i,1,1},{i,12,31}}],{i,Range[1980,lastyear]}];
We shift all years to 2026 to compare the water level on the same dates, but different years.
In[]:=
tsshifted=TimeSeriesShift[tseriesyearly[[#-1979]],{{lastyear-#,"Year"},{0,"Day"}}]&/@Range[1980,lastyear];

Everything works fine, except for the iconization

In[]:=
Iconize[tsshifted,"tsshifted"]
Out[]=
tsshifted
Now there is a problem with the iconized array of time series.
In[]:=
tsshifted
Out[]=