Bart D. Ehrman, Heaven and Hell: A History of the Afterlife (New York: Simon & Schuster, 2020), 120-121.
The pseudonymous authorship…is a literary ploy used by authors to convince their readers that they know what was soon to happen, and so to provide comfort for them in their time of trouble. That is certainly the case with the book of Daniel, who, by extensive recounting of detailed visions about the future of Judea, allegedly written centuries earlier, discusses at length the rule of Antiochus Epiphanes, without calling him by name, and his ultimate fate. The real author is clearly living during Antiochus’ reign, and he actually predicts Antiochus’ death in a final battle in the Promised Land (Daniel 11:40-45). This particular prediction did not come true, showing that the book was produced sometime before Antiochus died in Persia in 164 BCE.