Add more frequencies.

This commit is contained in:
Hyperling 2025-02-06 11:50:23 -07:00
parent 2acabf4d3b
commit 9d8a5e6685

View File

@ -1,12 +1,53 @@
// https://www.tutorialspoint.com/dart_programming/dart_programming_enumeration.htm
enum Frequency {
daily(title: "Daily"),
weekly(title: "Weekly"),
biweekly(title: "Biweekly"),
montly(title: "Monthly"),
yearly(title: "Yearly");
daily(
title: "Daily",
hint: "Once Per Day",
timesPerYear: 364.25,
),
weekly(
title: "Weekly",
hint: "Once Per Week",
timesPerYear: (364.25/7),
),
biweekly(
title: "Biweekly",
hint: "Every Other Week",
timesPerYear: (364.25/7/2),
),
bimonthly(
title: "Bimonthly",
hint: "Twice Per Month",
timesPerYear: 24,
),
montly(
title: "Monthly",
hint: "Once Per Month",
timesPerYear: 12,
),
quarterly(
title: "Quarterly",
hint: "Every Three Months",
timesPerYear: 4,
),
biannual(
title: "Biannual",
hint: "Twice Per Year",
timesPerYear: 2,
),
yearly(
title: "Yearly",
hint: "Once Per Year",
timesPerYear: 1,
);
const Frequency({required this.title});
const Frequency({
required this.title,
required this.hint,
required this.timesPerYear,
});
final String title;
final String hint;
final double timesPerYear;
}