Add ternary date condition