Date Function to obtain holiday date
Hi, I have a mysql database and a holidays table inside. As you know, there are standard fixed holidays (like christmas, happening every december 25th), and there are variable holidays (like the ones that happen the first saturday of the month, the last sunday of the month, and like that). I am storing this two type of holidays and then I have to display them. For the fixed there is no problem, as I only display the day, the month and the current year. For the variables, I use the weekday number (1=sunday,2=monday, etc), the th value (the 1st monday..., the 3rd friday..., etc.), the month, and the current year.
WHERE (fixeddate = 1 AND DATE(CONCAT(YEAR(CURRENT_DATE),'-',fix_month,'-',fix_day)) BETWEEN CURRENT_DATE AND DATEADD(CURRENT_DATE, INTERVAL 30 DAY)) OR
(fixeddate = 0 AND DATE(/* here I need to obtain the date for the variables on the current year*/) BETWEEN CURRENT_DATE AND DATEADD(CURRENT_DATE, INTERVAL 30 DAY))
How can I obtain the variable date for the current year?