Prophecy (586-570 B.C.)
This is what the LORD says: “A voice is heard in Ramah, mourning and great weeping, Rachel weeping for her children and refusing to be comforted, because her children are no more.” Jeremiah 31:15 (NIV)
When Herod realized that he had been outwitted by the Magi, he was furious, and he gave orders to kill all the boys in Bethlehem and its vicinity who were two years old and under . . . then the [prophecy] was fulfilled. Matthew 2:16-4:1 (NIV)
Through the prophet Jeremiah, 586 – 570 B.C., God indicated that some of Israel’s children would be murdered at the coming of the Messiah. Josephus indicates in his writings which are recorded in the Antiquities of the Jews. 17.6.5 that this event did occur. Also, Macrobius quotes Augustus Caesar that a slaughter of children occurred in Jerusalem.,
When it was heard that, as part of the slaughter of boys up to two years old, Herod, king of the Jews, had ordered his own son to be killed, he [the Emperor Augustus] remarked, “It is better to be Herod’s pig than his son.” 
Therefore, we can conclude that this prophecy did occur near the time of Jesus’ birth,
1. Macrobius. Saturnalia. Book 2, section 4.