Skip to content

Commit

Permalink
Merge pull request #5 from Tim-Unger/dev
Browse files Browse the repository at this point in the history
fix bug with GeneratePrevious
  • Loading branch information
Tim-Unger authored Mar 12, 2024
2 parents d78ce54 + 49bcf76 commit 85a1ec4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion AiracGen.Debugger/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using AiracGen;

var next = AiracGenerator.GenerateNext();
var next = AiracGenerator.GeneratePrevious();

var airacs = AiracGenerator.GenerateFuture(20);

Expand Down
4 changes: 2 additions & 2 deletions AiracGen/AiracGen.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<Title>AiracGen</Title>
<Authors>Tim Unger</Authors>
<Company>Tim Unger</Company>
<FileVersion>1.3.2</FileVersion>
<Version>1.3.2</Version>
<FileVersion>1.3.3</FileVersion>
<Version>1.3.3</Version>
</PropertyGroup>

</Project>
2 changes: 1 addition & 1 deletion AiracGen/Generator/GeneratePast.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ internal static List<Airac> Generate(int amount)
{
var currentAirac = Current.Generate();

var airacs = new List<Airac>() { currentAirac };
var airacs = new List<Airac>();

var startDate = currentAirac.StartDate;
var endDate = currentAirac.EndDate;
Expand Down
2 changes: 1 addition & 1 deletion AiracGen/Generator/GeneratePrevious.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ private static Airac GeneratePrevious(string? ident)
if (ident is null)
{
//No ident assumes the current airac, so we will just create one airac in the past and return it
return AiracGenerator.GeneratePast(1)[1];
return AiracGenerator.GeneratePast(1)[0];
}

var currentAirac = AiracGenerator.GenerateSingle(ident);
Expand Down

0 comments on commit 85a1ec4

Please sign in to comment.