Generate keys based on specific periods (command line switches: -week, -month, -year) and use ISO 8601 for date formatting