simplified if-function to hide dates in past