MB-12060. Simplify date_diff impl