Skip to main content

MAX_USAGE_WINDOW_DAYS

Constant MAX_USAGE_WINDOW_DAYS 

Source
pub const MAX_USAGE_WINDOW_DAYS: i64 = 36_500;
Expand description

The widest GET /api/usage?days= window the server answers (#255).

The server builds the window with chrono::Duration::days, which panics past about 106 million days. A century is far beyond any retained history and far inside that bound. Shared here so the server’s limit and the CLI’s --since limit are one number, not two that can drift.