Tax debt that is based on your income and for which a return was required to be filed within 3 years prior to the filing of your bankruptcy petition is not dischargeable in bankruptcy. See 11 U.S.C. Sect 523(a)(1)(A).
The “due date” includes extension dates. So if you filed for an extension to Oct. 15. you would not begin counting the three year period until Oct 15.
The 3 year period is also extended by a prior bankruptcy plus 6 months.