If I understand your question correctly, then there is no need to rely on any other utility. You can make use of POSIX shell parameter expansion and substring removal to parse the year, month, and day and put them together in a reformatted date string that can be used with date -d "string" to get the number of seconds since epoch (1970-01-01 00:00:00 UTC) and compare that against the current date/time to determine if the date read is before the current. You can then output "NO" if it is.
Example:
#!/bin/sh
while IFS=$' \t\n,' read -r fdate ans
do
yr="${fdate##*-}" ## parse year
tmp="${fdate%-$yr}" ## parse tmp="day-month"
day="${tmp%-*}" ## parse day
mo="${tmp#*-}" ## parse month
rfdate="${yr}-${mo}-${day}" ## create "year-mo-day" string
## compare date string with current day/time (seconds since epoch)
if [ "$(date -d "$rfdate" +%s)" -lt "$(date +%s)" ]
then
echo "$fdate, NO"
else
echo "$fdate, $ans"
fi
done < dat/dates
Example Input
$ cat dat/dates
07-04-2017 ,YES
08-04-2017 ,YES
09-04-2017 ,YES
10-04-2017 ,YES
11-04-2017 ,YES
07-04-2017 ,YES
Example Use/Output
$ sh datebeforetst.sh <dat/dates
07-04-2017, NO
08-04-2017, NO
09-04-2017, NO
10-04-2017, NO
11-04-2017, YES
07-04-2017, NO
You can adjust how the current day is compared if you need to consider 'today' not in the past, for example (now - 24 hours):
if [ "$(date -d "$rfdate" +%s)" -lt "$(($(date +%s)-86400))" ]
results in output of:
$ sh datebeforetst.sh <dat/dates
07-04-2017, NO
08-04-2017, NO
09-04-2017, NO
10-04-2017, YES
11-04-2017, YES
07-04-2017, NO