Dev Helpers
← Back

Generate a date series

Generate a date series using SQLite.

Open this example in the interactive library

Source code

WITH RECURSIVE days(d) AS (VALUES('2026-01-01') UNION ALL SELECT date(d,'+1 day') FROM days WHERE d<'2026-01-05') SELECT d FROM days;

Sample output

[
  {
    "d": "2026-01-01"
  },
  {
    "d": "2026-01-02"
  },
  {
    "d": "2026-01-03"
  },
  {
    "d": "2026-01-04"
  },
  {
    "d": "2026-01-05"
  }
]