define hash on duration
Merge pull request #17160 from lsylvester/duration-hash

define hash on duration