-
Notifications
You must be signed in to change notification settings - Fork 0
/
custom_function.js
52 lines (48 loc) · 1.04 KB
/
custom_function.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
* @param datestring: date in BS
* @return date in AD
* @customfunction
*/
function DateToAD(datestring) {
return DateBS.fromString(datestring).toAD();
}
/*
* @param datestring: date in AD
* @return date in BS
* @customfunction
*/
function DateToBS(datestring) {
return DateBS.fromAD(datestring).toString();
}
/*
* @param datestring: date in BS
* @return month in number
* @customfunction
*/
function BSMonth(datestring) {
return DateBS.fromString(datestring).month;
}
/*
* @param datestring: date in BS
* @return month name in english
* @customfunction
*/
function BSMonthString(datestring) {
return DateBS.fromString(datestring).monthInString();
}
/*
* @param datestring: date in BS
* @return month name in nepali
* @customfunction
*/
function BSMonthNepali(datestring) {
return DateBS.fromString(datestring).monthInStringNepali();
}
/*
* @param datestring: date in BS
* @return month name in nepali
* @customfunction
*/
function BSFinancialYear(datestring) {
return DateBS.fromString(datestring).financialYear();
}