Use a daylight sensor. By using redstone to check the output of the lamp, you can trigger an output line each dawn and evening. Use a T-flip-flop to reduce those 2 pulses to one long pulse every dawn. Connect that to a command block which summons an item into a hopper which points into a chest.
When the player presses the button, another hopper will take the items out of the chest. Run a comparator out of that hopper into a redstone clock. Set up the clock correctly so each item that passes through the hopper will turn the clock on and off once. Connect the clock to a commend block, set up to give whatever item to the player, or to summon it on the ground, or whatever other action.
The result: The number of dawns that have passed since the button was last pressed will be counted. When the button is pressed, the command block will run once for each dawn that passed. The recording of how many dawns have passed will be set to 0, ready for the next button press.
I saw in a comment that you had trouble with people griefing the daylight sensor. If that is a problem, just move the entire command block setup somewhere that no one can reach. For example, very high up, or a million blocks away. Even though there are no barrier blocks in 1.7, you can still use bedrock to stop players getting in. If they are able to reach the daylight sensor still, then add a command block which executes every tick and places a daylight sensor if there isn't one already there. The result: The daylight sensor cannot be permanently broken and no other parts can be reached.
EDIT: The command to place a new daylight sensor only if it has been removed should be:
setblock x y z minecraft:daylight_sensor 0 replace minecraft:air
Of course, replace x y z
with the correct coordinates of where the daylight sensor should go. Also, that command will need to be executed every tick. If you need instructions, read this article https://minecraft.wiki/w/Clock_circuit and scroll to the section "Setblock clock". Good luck!