Skip to content

Commit 0f02502

Browse files
aj3shsugat009
andauthored
refactor: update parseNepaliFormat function
Co-authored-by: Sugat Bajracharya <[email protected]>
1 parent 4506f6a commit 0f02502

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/NepaliDate.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -640,11 +640,10 @@ class NepaliDate {
640640
* const nepaliDate = NepaliDate.parseNepaliFormat(dateStringNe, format)
641641
*/
642642
static parseNepaliFormat(dateStringNe: string, format: string): NepaliDate {
643-
const [year, month0, day, hour, minute, second, ms] = parseNepaliFormat(
643+
return new NepaliDate(...parseNepaliFormat(
644644
dateStringNe,
645645
format
646-
)
647-
return new NepaliDate(year, month0, day, hour, minute, second, ms)
646+
))
648647
}
649648

650649
/**

0 commit comments

Comments
 (0)