The Muratorian canon does not include James (it also includes Wisdom as an NT book, excludes 1 and 2 Peter, and accepts only 2 Epistles of John; it includes the Shepherd of Hermas as apocryphal and the Apocalypse of Peter as “questionable”). It is from ca. 170 AD. The fragment containing the Muratorian canon is damaged and incomplete, so it is not assured - these that I have stated, are “scholarly consensus”.
The Canon of Athanasius - written by that great defender of the Trinity - is the earliest complete listing of the NT canon that has survived to this day intact, includes all 27 books as we currently find them. It was written in 367 AD, in the
39th Festal Letter of Athanasius. The Third Council of Carthage in 397 (Denzinger 186/92) confirmed this canon, along with the canon of Pope Damasus I of 382, which was identical to the Athanasian canon, and to our modern New Testaments.
So, the NT of 27 books was definitively settled by, at the latest, 400 AD. 1100 years before the Reformation. Probably 1200 years. The OT canon took longer to be settled dogmatically - only the Council of Trent did such, and dogmatized the list of books for both OT and NT - but it was accepted much earlier. The aforementioned Canon of the Third Council of Carthage (397 AD) enumerates the books of the Bible, including the Deuterocanonical books (listed as “Tobias, Judith, Five books of Solomon, Two books of Maccabees”), as Catholics have it today.
Here is the canon adopted by Third Carthage (397), as listed in Denzinger,
Enchiridion Symbolorum 186/92 (translation is mine):
Denzinger 186/92 said:
" … ut praeter scripturas canonicas nihil in ecclesia legatur sub nomine divinarum Scripturarum. Sunt autem canonicae scripturae: Genesis, Exodus, Leviticus, Numeri, Deuteronomium, Iesu(s) Nave, Iudicum, Ruth, Regnorum libri quatuor, Paralipomenon libri duo, Job, Psalterium Davidicum, Salomonis libri quinque, duodecim libri Prophetarum, Esaias, Ieremias, Daniel, Ezechiel, Tobias, Iudith, Hester, Hesdrae libri duo, Machabaeorum libri duo. Novi autem Testamenti: Evangeliorum libri quatuor, Actus Apostolorum liber unus, Pauli Apostoli epistolae tredecim, eiusdem ad Hebraeos una, Petri duae, Ioannis tres (comp. DS 180), Iacobi una, Iudae una, Apocalypsis Joannis.(Additur in quodam cod.: )…ut de confirmando isto canone transmarina Ecelesia consulatur."
"…except for the canonical Scriptures, nothing in Church is to be read under the name of “divine Scripture”. Now, these are the canonical Scriptures: Genesis, Exodus, Leviticus, Numbers, Deuteronomy, Joshua son of Nun, Judges, Ruth, Four books of Reigns [Kings, called Reigns in the LXX], two books of Paralipomenon [Chronicles, called Paralipomenon in the LXX], Job, the Psalter of David, five books of Solomon [Ecclesiastes, Song of Solomon, Wisdom, Proverbs*], twelve books of Prophets [the Minor Prophets], Isaiah, Jeremiah, Daniel, Ezekiel, Tobias, Judith, Esther, two books of Ezra, two books of Maccabees:
“For the New Testament: four books of the Evangelists, one book of Apostolic Acts, the Apostle Paul’s thirteen Epistles, one by the same to the Hebrews, two of Peter, three of John, one of James, one of Jude, the Apocalypse of John…confirming that this is the canon of all Churche [lit. “overseas churches”] consulted.”
*Ecclesiasticus, the Wisdom of Jesus son of Sirach, is probably included under the “five books of Solomon”, as wisdom literature, as there’s no other possible contender for “fifth book of Solomon”.