All four dreams come from the period around the Nativity of Jesus and his early life, between the onset of Mary's pregnancy and the family's return from the Flight to Egypt.
Learn, hence, not to choose for yourself, but receive everything in the ordinary way of God's providence, and as coming from His hands, in regard to place, employment, prosperity, and adversity.
An outside setting may suggest the second dream, as does the angel pointing outside the picture space, urging Joseph to leave.
In the absence of a place in a sequence, inscribed text, a title, or decor showing a setting in Egypt, the third and fourth dreams can generally be ruled out where there is uncertainty.
It was popularised by Pope Francis, who said during a 2015 visit to the Philippines, "when I have a problem, a difficulty, I write a piece of paper and put it under St. Joseph, because he dreams about it!