Skip to content

Commit

Permalink
New year's colloscope fix
Browse files Browse the repository at this point in the history
  • Loading branch information
FlashOnFire committed Jan 1, 2024
1 parent bc27114 commit 724f890
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ class ColloscopeCubit extends Cubit<ColloscopeState> {
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;
Expand Down

0 comments on commit 724f890

Please sign in to comment.