Skip to content

Commit

Permalink
Add trailing zeros to YW string representation
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarfgq authored and geoperez committed Jan 9, 2024
1 parent 9f896cc commit e610ce0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Unosquare.DateTimeExt/YearWeekBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ public void Deconstruct(out int year, out int week)
week = Week;
}

public override string ToString() => $"{Year}-W{Week}";
public override string ToString() => $"{Year}-W{Week.ToString().PadLeft(2, '0')}";
}

0 comments on commit e610ce0

Please sign in to comment.