setting a specific month value

By: H Wagner | Asked: 10/25/2022
ForumsCategory: Code Helpsetting a specific month value
H Wagner asked 1 year ago

I have this below in as "default value" 

[frm-set-get day=[date format=d]][frm-condition source=param param=day greater_than=24][frm-math]([date format=n] + 3 )[/frm-math][/frm-condition][frm-condition source=param param=day less_than=25][frm-math]([date format=n] + 2 ) [/frm-math][/frm-condition]

It checks the current date, and if the date is greater than 24, its adding 3 to the current month [date format=n] + and if it is less than 25, its add 2 to the current month [date format=n] + 2

It works perfect until we reach the 25 oktober (month 10), then november (month 11) and december (month 12) is the same problem as then the return value is wrong - as there's no months that has that value (13+14+15)

So I need to rewrite/extend' the function to check if the month is a particular month (above 25 October) it then sets the value to dec(12) and when under 25 november it sets jan(1) and above 25 november it set feb(2) - the same goes for december. (below/above)

Hope it makes sense in what I would like to achieve :)  

Can anyone assist?   

Attachments

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right