ZCUDVIEBTLDSQPW472DG7SLMX3FE33J4DESMLCIBBJJFMGDW76VQC
4C7QXSEQ7XGPZDLCUTFSDCORVEMIRVD55IZTCTP6W4QQCCI52CZQC
B7W4Q522DLB6DKH2TFDOCTSZFZLFTOLCT6CCZEOC3V3UUMSAOOFAC
AJKCAY3ODMTFBO6GXWXWQSWNFIH3H7JNBRFVW5H6ZSWA7SZGY3FAC
B6QIBRKFDFZKHHHT6F6M2NST2CYXNK4FCCYL3JOIAYDZYX3FQLRAC
IT55ASWSZHHHW7MZ6MWVFZFZZNA3WKFBXQLNAFY7PYGHYQUJOZIAC
BZWC6XMOUXEPOI7P65MREJZ45TSQRFMMR2SQ7LML7RMCKUL57VHAC
2GEG6ZQ27IJCPN5ZJIVTQT7EB3ML2X3SGIFUM2EWWEKU5Q5HRRJAC
CKULEF2ZEI7U6GBA5JZQ6AMDP77G4X5RGNQO3TML6LJLA6UDL54QC
WGKOIHMDRGXLPCDAS6SA673OXYEAQI2IEE6RX777RO7BA64VXDGAC
Q4BYGYNX3UZXX47EMX2GWX6M6ICSMIMCLQ7HVOYS4HB4RHYI4NEQC
GGREOYIRZE2GH62X7YXQA7IUSSB25ENLQ5OKVJYWPNI462DP37FAC
LSMR562IYSS2SXBN4TZFXKKFMQBFG6I3CU2JXBH65BQ46IESAPRAC
7QS7R2ORWCZMTCE3SD5PJ5ZL27N3RS7YCWBHXH3JDPTHDQ3KBAMQC
let mut ilvl_min = std::f32::INFINITY;
let mut ilvl_max = std::f32::NEG_INFINITY;
// so much unwrap
let ilvl_min = fightmap[&logs[0].iid]
.iter()
.find(|f| f.avg_ilvl.is_some())
.and_then(|f| f.avg_ilvl)
.ok_or(anyhow!("no ilvl data"))?;
let ilvl_max = fightmap[&logs.last().unwrap().iid]
.iter()
.filter(|f| f.avg_ilvl.is_some())
.last()
.and_then(|f| f.avg_ilvl)
.ok_or(anyhow!("no ilvl data"))?;
let res = (
med_start.start_time.round_to(30),
end_time.round_to(30),
data.len(),
);
let res = (med_start.round_to(30), end_time.round_to(30), data.len());
#[cfg(test)]
mod test {
use super::*;
#[test]
fn date_round_to() {
let date = Utc.ymd(2020, 2, 25).and_hms(0, 12, 0);
assert_eq!(date.round_to(30).minute(), 0);
let date = date + Duration::minutes(3);
assert_eq!(date.round_to(30).minute(), 30);
}
#[test]
fn duration_round_to() {
let dur = Duration::minutes(0);
assert_eq!(dur.round_to(30).num_minutes(), 0);
let dur = Duration::minutes(12);
assert_eq!(dur.round_to(30).num_minutes(), 0);
let dur = Duration::minutes(15);
assert_eq!(dur.round_to(30).num_minutes(), 30);
let dur = Duration::hours(27) + Duration::minutes(14) + Duration::seconds(59);
assert_eq!(dur.round_to(30), Duration::hours(27));
let dur = Duration::hours(27) + Duration::minutes(15);
assert_eq!(
dur.round_to(30),
Duration::hours(27) + Duration::minutes(30)
);
}
#[test]
fn test_weekpoint() {
let date = Utc.ymd(2021, 2, 25).and_hms(0, 12, 0);
println!("{:?} {} {}", date, date.hour(), date.minute());
assert_eq!(weekpoint(date), Duration::days(4) + Duration::minutes(12));
}
}
import { formatDate } from './format';
const CHANGES = [
{
date: '2021-02-25T23:41:00-05:00',
messages: [
'Removed PTR logs from analysis.',
'The "Min ilvl" and "Max ilvl" fields have been replaced by "Start Raid Avg ilvl" and "Kill Raid Avg ilvl" to give a more grokkable stat.',
'Loosened the requirement on the number of times a raid date must appear to be included in the Team Overview. If you were missing a raid date, it is probably present now.',
'Fixed an issue in raid date calculation that was resulting in raid times being 30 minutes off.',
]
}
];
function Change({ date, messages }: { date: string; messages: string[] }) {
return (
<>
<dt className="border-b border-gray-200 w-min whitespace-nowrap">{formatDate(new Date(date)!)}</dt>
<dd className="mb-5">
<ul className="list-dash pl-5">
{messages.map((msg, ix) => <li key={ix}>{msg}</li>)}
</ul>
</dd>
</>
)
}
export default function Changelog() {
return (
<section className="mt-5">
<header className="font-serif text-2xl">
<legend>Recent Changes</legend>
</header>
<dl className="text-lg">
{CHANGES.map((change, ix) => <Change {...change} key={ix} />)}
</dl>
</section>
);
}