Skip to content

VerseRef.GetBBBCCCVVV does really unexpected things at the upper limit #1479

@tombogle

Description

@tombogle

I can't think of any scenario where using modulus to prevent a verse or chapter number from going out of range would give a a helpful result. Worse yet, at 999 (the purported max), we actually seem to have an unintentional off-by-one error, and 999 gets treated as 0. I would argue that if a verse or chapter number has been set to a value > 999, it should just be clamped to 999, in much the same way we are dealing with negative values.
It could possibly be argued that out-of-range values should throw an exception, or at least that a flag could be passed indicating whether the caller wants to clamp or throw.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions