The outer courtyard of the Jerusalem Temple, which was outside the stone warning fence, was considered the place for the Gentile nations. John uses this image to make a clear distinction between the people God recognizes and those he does not.
The 42 months and 1,260 days represent three and a half years, or an incomplete seven (see study notes on Daniel 7:24–25; 8:26; 9:24–27). John frequently uses these time periods in Revelation when persecution is evident and evil seems to control the world. God's people will remain secure in him (see study note on Revelation 11:1) even though God permits evil forces to persecute them (see Revelation 13:7; Mark 10:30).