"And the LORD utters His voice before His army" (Joel 2:11). "And the LORD utters His voice before His army" -- on Rosh Hashanah. "For His camp is very great" (Joel 2:11) -- these are Israel. "For mighty is the one who carries out His word" (Joel 2:11) -- for He gives strength to the righteous who do His will. "For great is the day of the LORD and very awesome" (Joel 2:11) -- this is the Day of Atonement. "And who can endure it?" (Joel 2:11) -- for Rabbi Crispa said in the name of Rabbi Yochanan: there are three ledgers, one of the wholly righteous, one of the wholly wicked, and one of those in between. "These to everlasting life" (Daniel 12:2) -- said Rabbi: these are the wholly righteous. "And these to reproaches and everlasting abhorrence" (Daniel 12:2) -- these are the wholly wicked. "Let them be blotted out of the book" (Psalms 69:29) -- these are the wicked. "Of the living" (Psalms 69:29) -- these are the righteous. "And let them not be written with the righteous" (Psalms 69:29) -- these are the in-between, to whom the Holy One, blessed be He, has given the ten days between Rosh Hashanah and the Day of Atonement: if they repent, they are written with the righteous, and if not, they are written with the wicked. Therefore Hosea warns Israel and says to them, "Return, O Israel" (Hosea 14:2).
Three Ledgers and the Ten Days That Decide the Middle
Pesikta DeRav Kahana 24:3
[ג] וי"י נתן קולו לפני חילו וג' (יואל ב:יא). וי"י נתן קולו לפני חילו, בראש השנה. כי רב מאד מחנהו (שם), אילו ישר'. וכי עצום עושי דברו (שם), שהוא מעצים כוחן של צדיקים שעשו רצונו. כי גדול יום י"י ונורא מאד (שם), זה יום הכיפורים. ומי יכילנו (שם), דמר ר' קריספא בשם ר' יוחנן שלש פינקסיות הן, אחת של צדיקים גמורים ואחת של רשעי' גמורים ואחת של בינונים. אלה לחיי עולם (דניאל יב:ב), א"ר אילו הצדיקים גמורים. ואלה לחרפות לדראון עולם (שם), אילו רשעים גמורים. ימחו מספר (תהלים סט:כט), אילו הרשעים. חיים (שם), אילו הצדיקים. ועם צדיקים אל יכתבו (שם), אילו בינונים שנתן להם הקב"ה עשרת ימים שבין ראש השנה ליום הכיפורים, אם עשו תשובה ניכתבים עם הצדיקים ואם לאו, נכתבים עם הרשעים. לפיכך מזהיר הושע את ישר' ואו' להם שובה ישראל (הושע יד:ב).