In Duden's 1. Klasse Tiergeschichten, there is this sentence on page 8:
Am Ende der Ferien schenkt die Bäuerin Malte ein Hühnerei.
das Ende die Ferien die Bäuerin Malte (a name) das Hühnerei
Below, are my understandings of the cases. Please correct or elaborate where I got things wrong.
Am = An dem => Dativ. Since "an" is a two way preposition, the author had a xhoice. Using the Dative indicates that the end of the vacation should be thought of as a prolonged period of time, during which the giving started, progressed, and completed. If the accusative had been used (Ans Ende), it would have marked the end as a brief moment in time and the giving started before the end. As soon as the giving was complete, that moment marks the end.
der Ferien is genative because the Vacation is the owner of the End.
die Bäuerin is performing the action, so it is nominative.
ein Hühnerei is accusative because that is what the giving action is acting on. The egg is the dynamic o ject.
Malte is in the dative case because he is the static object, and passively recieving the egg. If there had been an article (e.g. der Junge), it would be dative (i.e. dem Junge). If Malte had an adjective (e.g. kleine Malte), it would be dative without article: kleinem Malte. If it was a girl, then kleiner Maria.
This one sentence in a children's book required bringing together so much, that I hope it will serve as a good mosel for these concepts.
Thank you for your feedback.