I have a 12 month physical presence period from April 13, 2016 to April 14, 2017 and another between August 3, 2017 to August 4, 2018. Can I claim the qualifying days from Jan 1, 2016-April 13, 2016 and the days between August 3, 2017 and December 31, 2017?
Pub 54 says that 2 periods can overlap but doesn't say anything about a gap between 2 periods.
The physical presence test is for the tax year. So if I'm understanding correctly, you are saying that you were physically outside the U.S. from Jan 1 - Apr 14 2017 and again from Aug 3 to Dec 31 2017. So you do not meet the requirement for the tax year for being outside of the U.S.
Yes. I've done it before and again this year. It's covered the IRS instructions. If you were out for Jan-Aug and Nov-Dec in a given tax year, both periods can be excluded as long as each period individually meets the 330-day physical presence test. For example Jan-Aug qualifies based on Sep 2018-Aug 2019 and Nov-Dec qualifies based on Nov 2019-Oct 2020.