We use Present Perfect only with unfinished period of time:
What have you done today? (this year, this month etc)
We can use both Present Perfect and Past Simple with unfinished period of time:
What did you do at work today? (Asking about activities)
What have you done at work today? (Asking about results)
There may be different situations when we can use both Present Perfect and Past Simple with unfinished Period of Time (today, this year, etc), but we never use Present Perfect with finished period of time (yesterday, last year, last month, one millisecond ago, a hundred years ago, in 1964, one the 11th of August, from 1998 to 2003, at 5 in the morning, from 2 to 5, between 4 and 7 pm, etc)
More material: Specified finished vs Unspecified (period of) time