Implement the easter, FindWorkingDay, FindFirstMonday, and FindLastMonday functions in the /app/ directory to fulfill the following specifications:
Easter Calculation:
Implement a function easter(year int, type string) time.Time where type can be EasterWestern or EasterOrthodox.
The function should return the correct date for Easter Sunday based on the given year and type:
For EasterWestern, return April 21, 2019, and April 12, 2020, for the respective years.
For EasterOrthodox, return April 28, 2019, and April 19, 2020, for the respective years.
Finding the Next Working Day:
Implement a function FindWorkingDay(date time.Time) time.Time that returns the next working day (Monday to Friday) starting from the given date.
If the input date is a working day, it should return the same date. Otherwise, it should find the next available working day.
Finding the First Monday of the Month:
Implement a function FindFirstMonday(date time.Time) time.Time that returns the date of the first Monday that occurs in the month of the provided date.
For example, for January 1, 2021, it should return January 4, 2021.
Finding the Last Monday of the Month:
Implement a function FindLastMonday(date time.Time) time.Time that returns the date of the last Monday that occurs in the month of the provided date.
For example, for January 31, 2021, it should return January 25, 2021.
Ensure that all implemented functions pass the provided test cases. Make sure to handle edge cases such as:
Dates that are already Mondays.
The transition between months.
Validating the input year for Easter calculations (only process valid years).
Once your implementation is complete, run the test suite to confirm all tests pass successfully.
Important: declare your solution in package workalendar (the test file uses package workalendar, so the implementation must use the matching package name).