Write the shortest program, in the language of your choice, that takes as input a year on the Hebrew calendar, and outputs the corresponding Gregorian date for Rosh Hashana, in YYYY-MM-DD format.
~$ rh 5771
2010-09-09
~$ rh 5772
2011-09-29
~$ rh 5773
2012-09-17
- The input may come from either the command line or from stdin, whichever is more convenient.
- You may assume that the year will be between 5600 (1839) and 6000 (2239), inclusive.