Well, no, it wasn't the question, and that's the problem.
"Whistling whilst working" - two things going on at the same time - is, as you say, the gerondif (a gerund in English.)
But -" I spent the day working" isn't. That's where I go wrong (don't know about Chrissie). It comes out as "je passait la journée en travaillant" where it should be à travailler, as Clair said. Maybe one can see how it's possible to confuse the two?
"I couldn't sleep very well last night. Some noisy b*ggers going around in automobiles kept me awake." Ken Miles