Q5YMRI6KTZMC7CDKOMN75WV65UNM232LFGAEMBDWXZFXCKKFX4UQC
ZCUDVIEBTLDSQPW472DG7SLMX3FE33J4DESMLCIBBJJFMGDW76VQC
B6QIBRKFDFZKHHHT6F6M2NST2CYXNK4FCCYL3JOIAYDZYX3FQLRAC
fn tier_week(log: &Log, region: Region) -> i32 {
fn tier_week(start_time: DateTime<Utc>, region: Region) -> i32 {
let tier_start = Utc.ymd(2020, 12, 8).and_hms(0, 0, 0); let diff = log.start_time - (tier_start + region_offset(region));
let tier_start = Utc.ymd(2020, 12, 8).and_hms(0, 0, 0);
let diff = log.start_time - (tier_start + region_offset(region));
let tier_start = Utc.ymd(2020, 12, 8).and_hms(17, 0, 0); let diff = start_time - (tier_start + region_offset(region));
let tier_start = Utc.ymd(2020, 12, 8).and_hms(17, 0, 0);
let diff = start_time - (tier_start + region_offset(region));
kill_week: kill_log.as_ref().map(|log| tier_week(log, region)),
kill_week: kill_log .as_ref() .map(|log| tier_week(log.start_time.clone(), region)),
kill_week: kill_log
.as_ref()
.map(|log| tier_week(log.start_time.clone(), region)),
#[test] fn test_na_tier_week_monday() { let date = Utc.ymd(2020, 12, 22).and_hms(4, 59, 59); assert_eq!(tier_week(date, Region::NA), 1); let date = Utc.ymd(2021, 1, 18).and_hms(4, 59, 59); assert_eq!(tier_week(date, Region::NA), 5); }
#[test]
fn test_na_tier_week_monday() {
let date = Utc.ymd(2020, 12, 22).and_hms(4, 59, 59);
assert_eq!(tier_week(date, Region::NA), 1);
let date = Utc.ymd(2021, 1, 18).and_hms(4, 59, 59);
assert_eq!(tier_week(date, Region::NA), 5);
}