histogram: dateformat implementation unification and improments