From 724f89057c1f0f614836c6e6d1de48f3d1c4a102 Mon Sep 17 00:00:00 2001 From: FlashOnFire_ Date: Mon, 1 Jan 2024 14:29:01 +0100 Subject: [PATCH] New year's colloscope fix --- .../onyx/lib/screens/colloscope/states/colloscope_cubit.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/onyx/lib/screens/colloscope/states/colloscope_cubit.dart b/apps/onyx/lib/screens/colloscope/states/colloscope_cubit.dart index f68964ce..373118b6 100644 --- a/apps/onyx/lib/screens/colloscope/states/colloscope_cubit.dart +++ b/apps/onyx/lib/screens/colloscope/states/colloscope_cubit.dart @@ -74,7 +74,10 @@ class ColloscopeCubit extends Cubit { year = yearOverride; } else if (RegExp(r"^([pP])\d{7}$").hasMatch(username.trim())) { year = int.parse(username.substring(1, 3)); - year = DateTime.now().year - 2000 - year + 1; + year = DateTime.now().year - + 2000 - + year + + (DateTime.now().month >= 6 ? 1 : 0); } Student? student;