Calculate year for end date: PostgreSQL
- by Dave Jarvis
Background
Users can pick dates as shown in the following screen shot:
Any starting month/day and ending month/day combinations are valid, such as:
Mar 22 to Jun 22
Dec 1 to Feb 28
The second combination is difficult (I call it the "tricky date scenario") because the year for the ending month/day is before the year for the starting…