Skip to content

Commit

Permalink
Fix date parsing bug
Browse files Browse the repository at this point in the history
  • Loading branch information
gavbrennan committed Jul 3, 2024
1 parent ec99182 commit 6a5b52c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Qwack.Dates/DateExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ public static (DateTime Start, DateTime End) ParsePeriod(this string period)
return (Start: new DateTime(dm.Year, dm.Month, 1), End: new DateTime(dm.Year, dm.Month, 1).LastDayOfMonth());
case string p when Months.Contains(p): //Jun
var mx = Array.IndexOf(Months, p) + 1;
var yx = DateTime.Today.Month >= mx ? DateTime.Today.Year : (DateTime.Today.Year + 1);
var yx = DateTime.Today.Month >= mx ? (DateTime.Today.Year + 1) : DateTime.Today.Year;
return (Start: new DateTime(yx, mx, 1), End: new DateTime(yx, mx, 1).LastDayOfMonth());
case string p when p.Length == 2 && int.TryParse(p.Substring(1, 1), out var yr) && FutureMonths.Contains(p.Substring(0, 1)): //X8
var m1 = Array.IndexOf(FutureMonths, p.Substring(0, 1)) + 1;
Expand Down
2 changes: 1 addition & 1 deletion version.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<PropertyGroup>
<VersionPrefix>0.8.49</VersionPrefix>
<VersionPrefix>0.8.50</VersionPrefix>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.8.49
0.8.50

0 comments on commit 6a5b52c

Please sign in to comment.