It isn't so cut and dry.
Let’s start with the possible meanings of Yom;
The Theological Wordbook of the Old Testament (1980, Moody Press)
"It can denote: 1. the period of light (as contrasted with the period of darkness), 2. the period of twenty-four hours, 3. a general vague "time," 4. a point of time, 5. a year (in the plural; I Sam 27:7; Ex 13:10, etc.)."
Strong's Exhaustive Concordance of the Bible (symbols omitted)
from an unused root meaning to be hot; a day (as the warm hours), whether literal (from sunrise to sunset, or from one sunset to the next), or figuratively (a space of time defined by an associated term), [often used adv.]:--age, + always, + chronicles, continually (-ance), daily, ([birth-], each, to) day, (now a, two) days (agone), + elder, end, evening, (for)ever(lasting), ever(more), full, life, as long as (...live), even now, old, outlived, perpetually, presently, remaineth, required, season, since, space, then, (process of) time, as at other times, in trouble, weather (as) when, (a, the, within a) while (that), whole (age), (full) year (-ly), younger
As you can see, Hebrew dictionaries attest to the fact that the word Yom is used for anywhere from 12 hours up to a year, and even a vague "time period" of unspecified length.
Other Uses of Yom
Day is not the only translation for the word Yom. Here are some other uses.
It is interesting to note that in 67 verses in the Old Testament, the word Yom is translated into the English word "time." For instance, in Genesis 4:3, it says "And in process of time it came to pass, that Cain brought of the fruit of the ground an offering unto the Lord." In this instance, Yom refers to a growing season, probably several months. Again, in Deuteronomy 10:10, it refers to a "time" equal to forty days. In I Kings 11:42, it says "And the time that Solomon reigned in Jerusalem over all Israel was forty years." In this case, Yom translated as the word "time" is equivalent to a 40 year period.
In Isaiah 30:8, it says "Now go, write it before them in a table, and note it in a book, that it may be for the time to come for ever and ever." In this case, Yom is equal to "forever." How long is forever? An infinite number of years...billions upon billions upon billons of years. If Yom can equal trillions of years here, then why not billions of years in Genesis?
Four times in the Old Testament Yom is translated "year." In I Kings 1:1, "David was old and stricken in years..." In 2 Chronicles 21:19, "after the end of two years" and in the very next verse "Thirty and two years old." Finally, in Amos 4:4, "...and your tithes after three years." In each case, Yom represents years, not days.
Eight times in the Old Testament Yom is translated "age." These range from sentences like "stricken in age," meaning old age (Genesis 18:11 and 24:1; Joshua 23:1 and 23:2), and other times it says "old age" (Genesis 21:2, Genesis 21:7). Genesis 47:28 refers to "the whole age of Jacob," therefore yom here refers to an entire lifetime. In Zechariah 8:4, it says old men and women will sit in the streets of Jerusalem, "each with cane in hand because of his age."
One time Yom is translated "ago." 1 Samuel 9:20 says "As for the donkeys you lost three days ago, ..."
Four times yom is translated as "always," in Deuteronomy 5:29, 6:24, 14:23, and in 2 Chronicles 18:7. Always here can be interpreted as a lifetime...for instance, we are to keep the commandments of the Lord always (Deut. 5:29).
Three times yom is translated "season." In Genesis 40:4, "...and they continued a season in ward." Again, in Joshua 24:7, "dwelt in the wilderness a long season," and in 2 Chronicles 15:3, "...a long season Israel hath been...". In each case yom represents a multi-month period.
When used in conjunction with the word dâbâr, yom is translated "chronicles" (27 times).Continually
When used in conjunction with kôwl, yom is translated as "continually" (11 times). Once, in Psalm 139:16, it is translated continuance (without the kôwl).
Ever is used to represent a long period of time, such as in Deuteronomy 19:9, "to walk ever in his ways." Nineteen times Yom is translated "ever." The old testament uses "for ever" instead of the word forever. In sixteen cases of use of the word ever, for is placed before it, indicating a infinite period of time. I will not list them all (consult Strong's Concordance for a full listing) but here is an example. In Psalm 23:6, it says "Surely goodness and mercy shall follow me all the days of my life; and I will dwell in the house of the Lord for ever." Here Yom is translated as the final word of this verse, ever. Thus, Yom in this verse, and 16 others, represents eternity.
In one instance, when yom is used in conjunction with kôwl, Yom is translated "evermore." Deuteronomy 28:29, "...and thou shalt be only oppressed and spoiled evermore;" thus representing either a lifetime or eternity.
Word Usage in the Old Testament
As you can see, Yom is used in a wide variety of situations related to the concept of time. Yom is not just for days...it is for time in general. How it is translated depends on the context of its use with other words.
Yom in the Creation Account
Even within the creation account, Yom is used to represent four different time periods.
Genesis 1:5 "And God called the light Day, and the darkness He called Night." Here, Moses uses Yom to indicate a 12-hour period
Genesis 1:14 "And God said, "Let there be lights in the firmament of the heaven to divide the day from the night, and let them be for signs, and for seasons, and for days, and years." Here, Moses uses Yom to indicate 24-hour days
Genesis 2:4 "...in the day that the Lord God made the earth and the heavens." Here, Moses uses Yom to indicate the entire creative week.
The fourth usage of Yom in the creation account is in the summary for each of the six creation days, "and there was morning and evening the first day". Yom is used to represent a finite, long period of time, usually either millions or billions of years. To show support for this, consider the uses of Yom by Moses.
Moses Other Uses of Yom
Moses, the author of the first five books of the Bible, and of Psalm 90, used Yom in many different ways.
Genesis 4:3 "And in process of time it came to pass, that Cain brought of the fruit of the ground an offering unto the Lord." In this instance, Yom refers to a growing season, probably several months.
Genesis 43:9 "...then let me bear the blame for ever." Here, Moses uses Yom to represent eternity
Genesis 44:32 "...then I shall bear the blame to my father for ever." Again, Moses uses Yom to represent eternity
Deuteronomy 4:40 "...that thou mayest prolong thy days upon the earth, which the Lord thy God giveth the, for ever." Here Yom represents a physical lifetime
Deuteronomy 10:10, "Now I stayed on the mountain forty days and nights, as I did the first time,..." Here, Yom is a "time" equal to forty days.
Deuteronomy 18:5 "...to stand to minister in the name of the Lord, him and his sons for ever." Again, Yom is translated as eternity
Deuteronomy 19:9 "...to love the Lord thy God, and to walk ever in His ways..." Here, Yom represents a lifetime. As long as we live we are to walk in his ways
As you can see, Moses used the word Yom to represent 12-hours, 24 hours, the creative week, forty days, several months, a lifetime, and eternity.