Skip to main content
1 of 2
Andy Ross
  • 19.4k
  • 2
  • 61
  • 93

This is the purpose of the TemporalRegularity option.

TemporalRegularity is an option for TemporalData, TimeSeries, and EventSeries that controls whether the paths are assumed to be uniformly spaced in time.

When setting this option, the dates themselves are ignored and a standard index {0,1,...,n} is used in its place, allowing for non-uniform dates/times to be used for labeling and plotting purposes while leveraging algorithms that require uniform spacing.

TimeSeries[
  Transpose@{DateRange[{2006, 12, 31}, {2007, 9, 30}, "EndOfMonth"], 
    Range[10]}, TemporalRegularity -> True] // RegularlySampledQ

(* True *)
Andy Ross
  • 19.4k
  • 2
  • 61
  • 93