Skip to content

Commit

Permalink
Logic updated as current year will always be current or last academic…
Browse files Browse the repository at this point in the history
… year
  • Loading branch information
Dominic NEED authored and Dominic NEED committed Nov 20, 2023
1 parent c9aaa1f commit e156f9b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static string KeyStage4DataTag(DateTime date)
public static string DetermineKeyStageDataStatus(DateTime date, KeyStages keyStage)
{
bool isItCurrentOrLastAcademicYear =
(date.Month >= 9 && date.Year == DateTime.Now.Year) ||
(date.Year == DateTime.Now.Year) ||
(date.Month < 9 && date.Year == DateTime.Now.Year - 1) ||
(date.Month >= 9 && date.Year == DateTime.Now.Year - 2);
StatusType statusType = isItCurrentOrLastAcademicYear ? DetermineStatusType(date, keyStage) : StatusType.Final;
Expand Down

0 comments on commit e156f9b

Please sign in to comment.