fields and date comparison functions