The grains Barley and Wheat used to set the date for the Festival of Weeks and the Festival of Booths The priest presented the first fruits of the harvest to God. The Feast of Weeks was seven weeks later. For this reason the day varied.
Source: Exodus 34:22 Leviticus 23:9-21