This page explains how the Genezio API reads a date range. Each report reads one range of dates, with start_date and end_date.

The rules of a date range

  • A date is YYYY-MM-DD, or a datetime of ISO 8601 such as 2026-09-01T08:00:00Z.
  • A date is a day in UTC.
  • Both ends are inclusive. An end_date of 2026-09-30 covers that whole day, up to 23:59:59.999999 UTC.
  • A datetime with no time zone is in UTC.
  • With no start_date, the range starts 30 days before its end.
  • With no end_date, the range ends now.
  • A range holds at most 366 days.

Examples of date ranges

info.query gives the range that the API read, with each end as a full datetime:

Periods and granularity

A report with granularity divides the range into periods: The date of a row is the first day of its period. The first and the last period can be partial: a range that starts on a Wednesday gives a first week that starts on the Monday before it.
A range that ends now gives a last period that is not complete. Compare the last period with care, or end the range at the last complete period.