WIP
This commit is contained in:
1 parent
4281924ee5
commit
fc702adfcd
13 files changed
+69
-22
No files matched your search
@@ -6,5 +6,6 @@ public enum RecurrenceType
|
||||
Daily,
|
||||
Weekly,
|
||||
Monthly,
|
||||
Yearly
|
||||
Yearly,
|
||||
FourWeekly
|
||||
}
|
||||
@@ -27,10 +27,11 @@ public class Salary
|
||||
|
||||
public string GetPaydaySummary() => RecurrenceType switch
|
||||
{
|
||||
RecurrenceType.Weekly => $"Every week on {StartDate:dddd}",
|
||||
RecurrenceType.Monthly => $"Monthly on the {GetOrdinal(StartDate.Day)}",
|
||||
RecurrenceType.Yearly => $"Annually on {StartDate:MMMM d}",
|
||||
_ => RecurrenceType.ToString()
|
||||
RecurrenceType.Weekly => $"Every week on {StartDate:dddd}",
|
||||
RecurrenceType.FourWeekly => $"Every 4 weeks on {StartDate:dddd}",
|
||||
RecurrenceType.Monthly => $"Monthly on the {GetOrdinal(StartDate.Day)}",
|
||||
RecurrenceType.Yearly => $"Annually on {StartDate:MMMM d}",
|
||||
_ => RecurrenceType.ToString()
|
||||
};
|
||||
|
||||
private static string GetOrdinal(int day) => day switch
|
||||
|
||||
Reference in new issue
Block a user