Need a lot more context!
For example, in a Data Warehouse, you construct a query to generate a list of dates, which you store in a table.
In a UI, you might always take the current date and use that to programmatically generate a list of options for the user.
In an API, you might pull it from a database, but in most cases, it would be programmatic. In specific cases, you might store a year or range in configuration, if the change is not tied to the calendar, but rather some business process.