remove usage of date diff funcions as not 5.1 compatible