Extended Pythagoras

The number of days in a year, 365, is a special number because it is the sum of three squared numbers. Find these three numbers. Find all possible sets of numbers. Is 366, the number of days in a leap year, just as special?

(Source: Adapted from Mathematics Teaching in the Middle School, Nov-Dec 1996)