There is little question that a number of significant events occurred over a period of "forty days" such as:
- Gen 7:4, 12, 17 - forty days of rain at Noah's flood
- Gen 8:6 - forty days before Noah open the window of the Ark
- Gen 50:3 - forty days to embalm the body of Joseph
- Ex 24:18, 34:28, Deut 9:11, 25, 18, 10:10 - Moses was in the mountain forty days
- Num 13:25, 14:34 - the spies explored the promised land forty days
- 1 Sam 17:16 - forty days Goliath defied Israel
- 1 Kings 19:8 - Elijah traveled forty days into the desert
- Eze 4:6 - Ezekiel had to lie on one side forty days
- Jonah 3:4 - Jonah predicted the destruction of Nineveh in forty days
- Matt 4:1, Mark 1:13, Luke 4:1, 2 - Jesus was in the Desert fasting for forty days
- Acts 1:3 - Jesus appeared to His disciples after the resurrection over a forty day period
In some of these cases, these forty day periods corresponded to forty year periods as well.
(Note: our English word, "quarrantine" means literally, "forty [days]" from the Renaissance Italian.)
All that can be said about this repeated use of the "forty-day" period is its clear significance - any such period occurs at a time of great trial followed by victory. Indeed, Ellicott suggests this in his comments on Gen 7:4 -
(4) Forty days.—Henceforward forty became the sacred number of
trial and patience, and, besides the obvious places in the Old
Testament, it was the duration both of our Lord’s fast in the
wilderness and of His sojourn on earth after the Resurrection.
The Pulpit commentary reaches a similar conclusion -
Gen 7:4 ... The importance assigned in subsequent Scripture to the
number forty, probably from the circumstance here recorded, is too
obvious to be overlooked. Israel wandered forty years in the
wilderness (Numbers 14:33). The scouts remained forty days in Canaan
(Numbers 13:26). Moses was forty days in the mount (Exodus 24:18).
Elijah fasted forty days and forty nights in the wilderness of
Beersheba (1 Kings 19:8). A respite of forty days was given to the
Ninevites (Jonah 3:4). Christ fasted forty days before the temptation
(Matthew 4:2), and sojourned forty, days on earth after his
resurrection (Acts 1:3). It thus appears to have been regarded as
symbolical of a period of trial, ending in victory to the good and in
ruin to the evil. ...