I have a scenario as below in pinescript.
I provide 4 dates in user input.
Example
Input 1 – 2024-07-10
Input 2 – 2024-07-17
Input 3 – 2024-07-24
Input 4 – 2024-07-31
Now
if current date(YYYY-MM-DD) is less then or equal to Input 1 then my final Date_Variable should have Input 1 date value.
If current date is greater then Input 1 but less then or equal to Input Date 2 then my final Date_Variable should have Input 2 date value.
If current date is greater then Input 2 but less then or equal to Input Date 3 then my final Date_Variable should have Input 3 date value.
If current date is greater then Input 3 but less then or equal to Input Date 4 then my final Date_Variable should have Input 4 date value.
Can any one help me with this Pine script code ?
I cannot find a simple Date validation logic anywhere.