According to the Haggai 1:1, the prophet Haggai is the author of the book.
It was written in approximately 520 BC.Haggai is the most precisely dated book in the Bible with the dates of each sermon given to the exact day, which I noticed as I was reading the book. Due to the accuracy of the dates, Keathley also suggests he may have kept a journal. The beginning of Darius's reign is established at 522 BC. Each of the four messages took place in the second year of his reign, (Haggai 1:1) which would be 520 BC. According to Hampton Keathley, the name Haggai means “festive” or “festival”. Many people believe the name was given because Haggai was born on or near a festival day. His ministry began on a moon festival day and the book record the festivities which will be enjoyed when Yahweh rules in the Day of the Lord.
Historically, Jerusalem's Temple rebuilding was urged by Haggai to the “returned remnant.”
The book of Haggai is divided into four parts. First, the going about of the construction of the Temple was being reproved. The temple was not being built because they had no interest in the house of God being rebuilt. Spirituly, God was forgotten. Second, support and comfort is given about the temple. Third, Haggai said that if the greatest importance was given to God in there actions, then God would bless them. This was Geisler means by the sancity of the Temple being the subject of the Lord's blessing. Last, the strength of the Temple is the topic of a promise.
I. The Appeal to Rebuild the Temple-Ch. 1
A. The appeal, 1:11 B. The preparations to build, 1:12-15
II. The New Temple, Ch. 2:1-19
A. The superior glories of it, 2:1-9 B. The blessings of its holy service, 2:10-19
III. The Messianic Kingdom, 2:10-23
Haggai's prophecies are dated meticulously and therefore easily analyzed. These discourses are being delivered within a four month span of time.
(1) Haggai 1, this appeal was delivered on September 1. The prophet chides the people for their indifference and apathy toward the work of rebuilding the temple and warns them to reconsider their ways. He tells them their procrastination is not due to lack of money or materials but they had been busy building their palatial homes and putting God's interests on the back burner until a more convenient time. This appeal had its desired affect because everyone including Joshua and Zerubbabel were our working on the reconstruction of the temple (1:14,15).
(2) Haggai 2:1-9, this next appeal was delivered on the 21st day of October, just one month after the work had been resumed. He delivered a note of encouragement to those who felt that the new temple was not going to be as elaborate as Solomon's temple. Haggai assured them that the latter glory of the new house shall eclipse the magnificence of Solomons. Soon a great “shaking: on Yahweh's part among the nations will usher in the Messianic age, and the precious things of all nations will flow in to beautify it.
(3) Haggai 2:10-19), this discourse has delivered on the 24th of December exactly 3 months after the building of the temple had resumed. It also contained a rebuke because of their indifference and lack of zeal to get the job done. The discourse was couched in the form of a parable (2:11-14), in which Haggai explains their prayers would remain unanswered because they had so long postponed the completion of the temple. If they would just press on then they would be blessed and fruitful seasons would follow because of their renewed zeal to complete the temple.
(4) Haggai 2:20-23, this last discourse was also delivered on the same day as the last one. The sequence is immediate. For when Yahweh shakes the nations, He will establish Zerubbabel, the representative of the Davidic dynasty and the object of patriotic hopes. The the heathen powers are overthrown, Zerubbabel will stand unshaken as Yahweh's honored and trusted representative here on earth.
The book of Haggai draws attention to common problems that most people face today. Gotquestions.org. did a great job of making what may seem to many an archaic book applicable to us today by challenging us (1) to examine our priorities to see if we are more interested in our own pleasures than doing the work of God, 2) to reject and a defeatist attitude and press on in the face of discouraging circumstances; 3) to confess our failures, “sins” and seek to live pure lives before God; 4) to act courageously for God because we have the assurance that He is with us always and is in full control of our circumstances; (I have to remind myself of this one often); 5) rest secure in God's hands knowing that He will abundantly bless us as we faithfully serve Him. Paydays don't always come on Fridays, more often than not we may have to wait for months, years, or maybe into eternity to see these blessings. They will come but on God's timetable!