date-selector: use atoi instead of strtol

This prevents the pseudo-bug where strtol thinks the date is in octal because of the leading zeros.