This is general programming, but I work in Java.
Given a date dd-mm-yyor dd-mm-yyyy(e.g. 13-01-2011), I want to convert it to a unique number, so any two dates have a different number. And the year is not important. Thus, the conversion of dd-mm to one unique int is permissible. Does anyone know an algorithm for this?
I'm SOrry: I want to be more specific:
Unique numbers must be from 1 to 365 (or from 0 to 364) or must be unambiguously modulo 365. (I ignore the case of leap years at the moment).
Thus, the union "ddmm" can be a unique 4-digit number. But modulo 365 would probably not be unique.
user485498
source
share