Period Data Source
7 min
overview the period data source generates a list of time periods — years or months — derived from the publication dates of issues in the catalog api it enables archive navigation by letting users browse issues organized by when they were published when to use this use period when building an archive or back issue browser where users navigate by year or month the list of periods is calculated dynamically from actual issue publication dates basic example { "type" "period", "contextkey" "archiveyears", "interval" "year", "issuefilter" { "publication" { "id" { "value" "\ publicationid" } } } } configuration type specific properties property type default description interval 'year' | 'month' 'year' granularity of the generated periods issuefilter object — filters which issues are used to derive the periods order 'asc' | 'desc' 'desc' order in which periods are returned startoffset number 0 subtract this many intervals from the current date to define the start of the range format object — customize display labels — { formattext, translatewithkeys? } for common properties ( contextkey , limit , batchsize , etc ) see data sources overview docid\ fumbuabweon oto5wfevf issuefilter properties scopes which issues are considered when generating periods uses storefrontissuefilter deprecated type storefrontissuefilter is deprecated in favour of contentfilter the issuefilter property will be migrated to use contentfilter (same shape as the content data source) in a future release filter key type description publication publicationfilter scope to a specific publication — use publication id publicationdate datefilter restrict to issues published within a date range age { amount, unit, operation? } restrict to issues of a certain age relative to now properties mapfilter filter by custom issue properties purchasable { value boolean } filter to purchasable or non purchasable issues purchased { value boolean } filter to purchased or non purchased issues id stringfilter filter by specific issue id supports and, or, and condition item structure each generated item contains field type description year number the year of the period month number the month (1–12), only present when interval is month label string human readable label (e g "2024" or "january 2024" ) testing notes / edge cases no issues = no periods if a publication has no published issues the list is empty interval default is year omitting it generates year level periods, not months order default is desc periods are newest first set "asc" to reverse gaps in publishing months/years without published issues do not appear in the list related topics data sources overview docid\ fumbuabweon oto5wfevf content data source docid\ dfdy32zanytmhkuhzxorb