According to Wikipedia, Dirichlet published a proof of the class number formula for quadratic fields in 1839, but it was stated in the language of quadratic forms.
Let d be a fundamental discriminant, and write h(d) for the number of equivalence classes of quadratic forms with discriminant d. The Dirichlet proved that h(d) is related to L(1, X) where X is the Dirichlet character associated with d.
Above is only defined when d is a fundamental discriminant. Since many numbers are NOT fundamental discriminant, is there a version of Dirichlet class number formula when d is NOT a fundamental discriminant ?