Files
SnowLuma/.pnpm-store/v11/files/4c/69ed5a5abf83b009d3ff6cf58e31c61e5a6460221d3254fddb01577f0d6901aa5f1adab5c5299cd41b1f2d9074839b4a062b44e10be4d99ef6e1ab75ebd1b1
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

19 lines
511 B
Plaintext

import { REFERENCE_YEAR, MIN_YEAR_SPACE } from '../../data/const.mjs';
var dateMatcher = ({
year,
separator
}) => {
// base guesses: (year distance from REFERENCE_YEAR) * num_days * num_years
const yearSpace = Math.max(Math.abs(year - REFERENCE_YEAR), MIN_YEAR_SPACE);
let guesses = yearSpace * 365;
// add factor of 4 for separator selection (one of ~4 choices)
if (separator) {
guesses *= 4;
}
return guesses;
};
export { dateMatcher as default };
//# sourceMappingURL=scoring.mjs.map