weeklyKey function
Gets the key for the week associated with key
.
If time
is specified, the key at that time is obtained.
Implementation
String weeklyKey(String key, [DateTime? time]) {
time ??= DateTime.now();
return "$key:${time.format("yyyyww")}";
}