@@ -156,7 +156,7 @@ export class VerseRef {
156156 private _verseNum = 0 ;
157157 private _verse ?: string ;
158158
159- constructor ( verseStr : string , versification ?: ScrVers ) ;
159+ constructor ( verseStr : string | number , versification ?: ScrVers ) ;
160160 constructor ( verseRef : VerseRef ) ;
161161 constructor ( versification ?: ScrVers ) ;
162162 constructor ( book : string , chapter : string , verse : string , versification ?: ScrVers ) ;
@@ -175,6 +175,16 @@ export class VerseRef {
175175 chapterEtc != null && chapterEtc instanceof ScrVers ? chapterEtc : undefined ;
176176 this . setEmpty ( _versification ) ;
177177 this . parse ( _verserStr ) ;
178+ } else if ( bookEtc != null && typeof bookEtc === 'number' ) {
179+ // constructor(bbbcccvvv: number, versification?: ScrVers);
180+ const _versification : ScrVers | undefined =
181+ chapterEtc != null && chapterEtc instanceof ScrVers ? chapterEtc : undefined ;
182+ this . setEmpty ( _versification ) ;
183+ this . _verseNum = bookEtc % VerseRef . chapterDigitShifter ;
184+ this . _chapterNum = Math . floor (
185+ ( bookEtc % VerseRef . bookDigitShifter ) / VerseRef . chapterDigitShifter
186+ ) ;
187+ this . _bookNum = Math . floor ( bookEtc / VerseRef . bookDigitShifter ) ;
178188 } else if ( chapterEtc == null ) {
179189 if ( bookEtc != null && bookEtc instanceof VerseRef ) {
180190 // constructor(verseRef: VerseRef);
0 commit comments