getSingleBealOrTsom method

Map<String, dynamic>? getSingleBealOrTsom(
  1. String name
)

A function to compute the month and day of the given feast of the fasting or feasting (Holiday). It returns Map object with the form of


{month: ሚያዝያ, date: 20}

Implementation

Map<String, dynamic>? getSingleBealOrTsom(String name) {
  Map<String, dynamic>? a;
  try {
    bool status = isMovableHoliday(name);
    if (status) {
      Map<String, dynamic> mebajaHamer = nenewe;
      int? target = _yebealTewsak[name];
      a = {
        "month": _months[_months.indexOf(mebajaHamer['month']) +
            ((mebajaHamer['date'] + target) ~/ 30) as int],
        "date": (mebajaHamer['date'] + target) % 30 == 0
            ? 30
            : (mebajaHamer['date'] + target) % 30
      };
    }
  } catch (e) {
    print(e.toString());
  }
  return a;
}