The chat option doesn't always work, so I've copied my answer into this format to make sure that you can see my answer:
Thank you for using justanswer
The instructions for Form 2555 state:
Physical Presence Test
To meet this test, you must be a U.S.
citizen or resident alien who is physically
present in a foreign country, or countries,
for at least 330 full days during any period
of 12 months in a row. A full day means
the 24-hour period that starts at midnight.
To figure 330 full days, add all separate
periods you were present in a foreign
country during the 12-month period shown
on line 16. The 330 full days can be
interrupted by periods when you are
traveling over international waters or are
otherwise not in a foreign country. See
Pub. 54 for more information and
This means that you don't have to use a calendar year from Jan 1-Dec 31 in order to meet the 330 day presence test
If you find that you don't meet the full presence test during any 12 month time frame, then you may take a reduced credit
You would calculate this by the # XXXXX days that you were on foreign soil/330
You would then use this % and multiply the $30,000 to calculate your Foreign Income Exclusion
Please see page 20 of IRS Pub 54
I hope this helps.