Hashing algorithm for dates

Which would be a good hash algorithm for hash dates, for example. 24/12/09 and 31/10/89?

Dates will range from 1950 to 2050.

Is it possible to use a unix timestamp?

+3
source share
1 answer

You can use the number of days instead of the number of seconds since starting Unix Epoch. Just calculate:

<unix timestamp> / 86400
+10
source

Source: https://habr.com/ru/post/1719827/


All Articles