A date can be represented by an unsigned integer as such: YYYYMMDD. What you need to do, is write the shortest program or function that figures out the most recent date whose number was divisible by a given number n
(including today's date) and then returns that date in the format showed above. If there has never been a date (between 00000101 and today inclusive) divisible by the given integer, you should return -1.
Examples
Current Date Input Output
30 July, 2014 4 20140728
30 July, 2014 7 20140729
28 July, 2014 4 20140728
28 July, 2014 7 20140722
28 July, 5 90000 -1
Input
You can read from STDIN or take a function argument or even expect the input to be stored in a variable. The input will be an unsigned integer.
Output
Write to STDOUT or return (or save in a variable) the integer representing the date in the format YYYYMMDD.
Restrictions
You may use any standard library your language offers. Standard loopholes apply.
Winning conditions
This is a code-golf, so smallest program (in bytes) wins. In case of a tie, the answer with the most votes wins.