"You cook dinner if he works."
Translation:Du laver aftensmad hvis han arbejder.
This post might help you out a bit. There is also a collection of posts (still under construction) if you go into the discussions page, and under "Popular" it should be towards the top with "Sticky" next to it, called The Danish Collection (Overview of Threads) [Please Read]
Your logic is somewhat correct. Danes used to eat their "middag" around lunch time. This was a hot meal and the main meal of the day, however as modern working hours came in, it became increasingly difficult to have middag at midday, and so it got pushed into the evening but managed to keep its name (unfortunately I can't seem to find my source for this now)