people today, call "Jonah's fast", can also be called
"Nineveh's fast" because we don't commemorate only Jonah in
the belly of the whale, but we also commemorate the
repentance of the people of Nineveh.
The Holy Bible does not tell us exactly how many days the people of Nineveh fasted. But the reason three is written in the midnight praises is because it is taken from the Septuagint version which states that the city will be overthrown in three instead of the forty days mentioned in the other versions.
"And Jonah began to enter into the city about a day's journey, and he proclaimed, and said, yet three days, and Nineveh shall be overthrown" (Jonah 3:4).
In the Holy Book of Jonah 3:7, it is mentioned that they did not eat nor drink even water, which makes fasting three days more acceptable than 40 days.
Please note that the Hebrew text is the one followed by all the ancient versions, except the Septuagint. On the other side the justification for the 40 days is: God gave them time to think, reject, take counsel, and return to him. It is clear that every Ninevite, who had heard the message of Jonah, repented and started fasting even before the news had reached the king and before he had published his decree "So the people of Nineveh believed God, proclaimed a fast, and put on sackcloth, from the greatest to the least of them. Then word came to the king of Nineveh" (Jonah 3:5-7).