Misoka,' was originally an old way of saying '三十日,' literally means the 30th day, but it came to mean the last day of the month regardless of its actual date.
「みそか」は本来は「三十日」の古い表現（ふつか、みっか、…と続く先にある言葉）だが、実際の日付にかかわらず月の最終日を指す。