Verse IDs -> References
#
Representing a Single Verse Reference as a Unique Integer IDAny single verse can be identified by an integer that contains the book, chapter, and verse information. The first 1-2 digits of the integer id represent the book, the next 3 digits represent the chapter, and the last 3 digits represent the verse.
For example, "Genesis 1:1" would be represented as:
"John 3:16" would be represented as:
The book of John is the 43rd book of the Bible, "003" represents the 3rd chapter, and "016" represents the sixteenth verse.
Since the book, chapter, and verses are standardized and unlikely to change, this allows us to reference verses in a very efficient way.
#
Converting a List of Verse IDs to a List of ReferencesWe can take a list of integer verse ids and convert it back into a list of normalized scripture references.
For example, the following list of verse ids represents the references Matthew 18:12-14 and Luke 15:3-7.
The conversion functionality would return the following list of normalized scripture references.