monthlyKey function

String monthlyKey(
  1. String key, [
  2. DateTime? time
])

Gets the key of the month associated with key.

If time is specified, the key at that time is obtained.

Implementation

String monthlyKey(String key, [DateTime? time]) {
  time ??= DateTime.now();
  return "$key:${time.format("yyyyMM")}";
}