Dates in sensor

Need some help with templating a sensor.

I got for example several dates as input and it should for e.g. from another sensor

if date is 2018/01/10 = today
elif date is 2018/01/11 = tomorrow
elif date is 2018/01/17 = next week

So for nextweek

if date is 2018/01/17 = today then the sensor should show today.

the dates are variable and are updated daily.