fn year(_: &mut VM, self_val: Value, args: &Args2) -> VMResult {
    args.check_args_num(0)?;
    let num = match self_val.as_time() {
        &TimeInfo::Local(t) => t.year(),
        &TimeInfo::UTC(t) => t.year(),
    };
    Ok(Value::integer(num as i64))
}
Time#year -> Integer
https://docs.ruby-lang.org/ja/latest/method/Time/i/year.html
ruruby/src/builtin/time.rs