Looking at QlikView help, I didn't find Year2Date(), but YearToDate() function. But the funny thing is that although the syntax editor doesn't understand Year2Date, it still resolves to the same result as YearToDate().
If(Year2Date(Date, 0, 1, Today()), 1, 0) As YTDFlag
1) Date -> This is the Date field you are trying to figure out if it is in the YTD or not
2) 0 -> Year Offset... is this for the current year (0) or last year (-1). Right now you have it from the current year's YTD
3) 1 -> First month of the year. Do you have January as your 1st month (1) or April as the first month (4)
4) Today() -> What is the upper limit of the YTD. In your case you are trying to figure out YTD till today(). So in case you have data points for August 2017, they would not be part of your YTDFlag
Does this make sense? The link I have shared have few example, do take some time to check them out.