Section 1328(f) of the Bankruptcy Code, by the BAPCPA,  provides the following concerning discharges granted (or denied) in Chapter 13 cases–

Discharge

Notwithstanding subsections (a) and (b), the court shall not grant a discharge of all debts provided for in the plan or disallowed under section 502, if the debtor has received a discharge

(1) in a case filed under chapter 7, 11, or 12 of this title during the 4-year period preceding the date of the order for relief under this chapter, or

(2) in a case filed under chapter 13 of this title during the 2-year period preceding the date of such order.

In In re West, 2006 Bankr. LEXIS 2562 (Bankr. E.D. Ark. October 10, 2006), the issue was exactly when the two year period started – the date of filing of the prior case, or the date of any discharge in the prior case.  The court found that it is the date of filing of the prior case that is referenced by the statute —

A plain reading of the statute supports this interpretation. The statute states that discharge is denied if  the prior case was "filed [under the relevant chapter] during the [2- or 4-year] period preceding the date of the order for relief." (Emphasis added.) What makes this code section so unclear is the impracticality of it. As recognized by William Houston Brown (former Bankruptcy Judge for the Western District of Tennessee),

This provision obviously has a potential chilling effect for those debtors who receive a quick discharge in a prior case but who then encounter a new cause for filing another case. This provision seems to ignore the realization that debtors who filed for Chapter 13 relief within two years of filing another case are unlikely to have obtained a discharge in that prior case. Rarely is a Chapter 13 debtor able to propose and obtain a confirmation of a less-than-two-year plan.

William Houston Brown, Taking Exception to a Debtor’s Discharge: The 2005 Bankruptcy Amendments Make it Easier, The American Bankruptcy Law Journal, 79 A.M. BANKR. L.J. 419, 449 (2005)<!—-> (emphasis added).

The court also found that this interpretation was supported by the legislative history –

To the Court’s knowledge, the only available legislative history on this new Code section is found in House Report, § 312 which provides that BAPCPA amends:

section 1328<!—-> to prohibit the issuance of a discharge in a subsequent chapter 13 case if the debtor received a discharge in a prior chapter 7, 11, or 12 case within four years preceding the filing of the subsequent chapter 13 case. In addition, it prohibits the issuance of a discharge in a subsequent chapter 13 case if the debtor received a discharge in a chapter 13 case filed during the two-year period preceding the date of the filing of the subsequent chapter 13 case.

H.R. 31, 109th Cong. § 312 (1st Sess. 2005). Examining the first sentence of § 312, the court in Capers concluded that § 1328(f)<!—-> was intended to lengthen the time between the discharges a debtor may receive. There, the Court stated:

Adoption of Debtor’s mechanical reading of § 1328(f)<!—-> would frustrate the policy that Congress sought to implement through the provisions of the section. Clearly, Congress sought to lengthen the time between the discharges debtors receive under chapters 7, 11, 12, and 13 and subsequently filed chapter 13 cases. Just as clearly, Congress determined that the length of time between discharges should be greater for debtors who had received a discharge in a previous chapter 7, 11, or 12 case than for debtors who previously received a chapter 13 discharge.

However, with respect to a previous chapter 13 case, § 312 clearly refers to the filing of the prior case and not when the discharge was received. Accordingly, the legislative history supports a plain language interpretation.