References -> Verse IDs
#
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 Single Reference to a List of Verse IDsGiven a normalized scripture reference, which can contain one or more verses, the conversion functionality will convert that normalized scripture reference into a list of verse id integers.
For example, given the following normalized scripture reference for Genesis 1:1-4:
The conversion functionality would return the following list of verse id integers:
#
Converting a List of References to a List of Verse IDsIf you need to convert a list of references (rather than a single reference) to a list of verse ids, use the convert_references_verse_ids
function rather than the convert_reference_to_verse_ids
function.
The conversion functionality would return the following list of verse id integers: