* Add helper to calculate statistic period start and end * Don't parse values in resolve_period * Add specific test for resolve_period * Improve typing * Move to recorder/util.py * Extract period schema