Quarter

Having the date (01/02/09), we define the quarter to which it belongs (answer: the first quarter).

Find the date of the end of the quarter to which the given date. For example, if you set the date 05.11.12, the date of the end of the quarter 31.12.12. Also find the start date of the quarter.