Skip to content

Commit 2ce1411

Browse files
authored
Merge pull request #69 from Sudan08/feat/dateConfigExport
feat: made date config object available in the package
2 parents 2ac48b0 + c8f99f9 commit 2ce1411

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/nepali-date-converter.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
IAdBs,
66
format,
77
Language,
8-
parse
8+
parse,
99
} from './nepali-date-helper'
1010

1111
const dateSymbol = Symbol('Date')
@@ -17,6 +17,8 @@ const convertToBSMethod = Symbol('convertToBS()')
1717
const convertToADMethod = Symbol('convertToAD()')
1818
const setAdBs = Symbol('setADBS()')
1919
const setDayYearMonth = Symbol('setDayYearMonth()')
20+
21+
export * from './date-config'
2022
export default class NepaliDate {
2123
private [jsDateSymbol]: Date
2224
private [yearSymbol]: number
@@ -209,7 +211,7 @@ export default class NepaliDate {
209211
getDateObject(): IAdBs {
210212
return {
211213
BS: this.getBS(),
212-
AD: this.getAD()
214+
AD: this.getAD(),
213215
}
214216
}
215217
/**
@@ -229,7 +231,7 @@ export default class NepaliDate {
229231
year: this[yearSymbol],
230232
month: this[monthSymbol],
231233
date: this[dateSymbol],
232-
day: this[daySymbol]
234+
day: this[daySymbol],
233235
}
234236
}
235237
/**
@@ -249,7 +251,7 @@ export default class NepaliDate {
249251
year: this[jsDateSymbol].getFullYear(),
250252
month: this[jsDateSymbol].getMonth(),
251253
date: this[jsDateSymbol].getDate(),
252-
day: this[jsDateSymbol].getDay()
254+
day: this[jsDateSymbol].getDay(),
253255
}
254256
}
255257

@@ -403,7 +405,7 @@ export default class NepaliDate {
403405
const { AD, BS } = convertToAD({
404406
year: this[yearSymbol],
405407
month: this[monthSymbol],
406-
date: this[dateSymbol]
408+
date: this[dateSymbol],
407409
})
408410
this[setAdBs](AD, BS)
409411
}

0 commit comments

Comments
 (0)