@fileverse-dev/formulajs 4.4.11-mod-6 → 4.4.11-mod-7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +0 -2
- package/lib/browser/formula.js +240 -385
- package/lib/browser/formula.min.js +2 -2
- package/lib/browser/formula.min.js.map +1 -1
- package/lib/cjs/index.cjs +70 -693
- package/lib/esm/index.mjs +71 -662
- package/package.json +13 -13
- package/types/cjs/index.d.cts +20 -509
- package/types/esm/index.d.mts +20 -509
package/lib/esm/index.mjs
CHANGED
|
@@ -24,6 +24,62 @@ var errors = /*#__PURE__*/Object.freeze({
|
|
|
24
24
|
value: value
|
|
25
25
|
});
|
|
26
26
|
|
|
27
|
+
let returnSerial = false;
|
|
28
|
+
|
|
29
|
+
const d1900 = new Date(Date.UTC(1900, 0, 1));
|
|
30
|
+
|
|
31
|
+
function useSerial() {
|
|
32
|
+
returnSerial = true;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function useDate() {
|
|
36
|
+
returnSerial = false;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function serialToDate(serial) {
|
|
40
|
+
if (serial < 60) {
|
|
41
|
+
serial += 1;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const utc_days = Math.floor(serial - 25569);
|
|
45
|
+
const utc_value = utc_days * 86400;
|
|
46
|
+
const date_info = new Date(utc_value * 1000);
|
|
47
|
+
const fractional_day = serial - Math.floor(serial) + 0.0000001;
|
|
48
|
+
|
|
49
|
+
let total_seconds = Math.floor(86400 * fractional_day);
|
|
50
|
+
|
|
51
|
+
const seconds = total_seconds % 60;
|
|
52
|
+
|
|
53
|
+
total_seconds -= seconds;
|
|
54
|
+
|
|
55
|
+
const hours = Math.floor(total_seconds / (60 * 60));
|
|
56
|
+
const minutes = Math.floor(total_seconds / 60) % 60;
|
|
57
|
+
let days = date_info.getUTCDate();
|
|
58
|
+
let month = date_info.getUTCMonth();
|
|
59
|
+
|
|
60
|
+
if (serial >= 60 && serial < 61) {
|
|
61
|
+
days = 29;
|
|
62
|
+
month = 1;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return new Date(date_info.getUTCFullYear(), month, days, hours, minutes, seconds)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function dateToSerial(date) {
|
|
69
|
+
const addOn = date > -22038912e5 ? 2 : 1;
|
|
70
|
+
|
|
71
|
+
return Math.ceil((date - d1900) / 86400000) + addOn
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
var date = /*#__PURE__*/Object.freeze({
|
|
75
|
+
__proto__: null,
|
|
76
|
+
dateToSerial: dateToSerial,
|
|
77
|
+
get returnSerial () { return returnSerial; },
|
|
78
|
+
serialToDate: serialToDate,
|
|
79
|
+
useDate: useDate,
|
|
80
|
+
useSerial: useSerial
|
|
81
|
+
});
|
|
82
|
+
|
|
27
83
|
const defaultOperator = '=';
|
|
28
84
|
const validSymbols = ['>', '>=', '<', '<=', '=', '<>'];
|
|
29
85
|
const _TOKEN_TYPE_OPERATOR = 'operator';
|
|
@@ -442,35 +498,6 @@ function numbers() {
|
|
|
442
498
|
return possibleNumbers.filter((el) => typeof el === 'number')
|
|
443
499
|
}
|
|
444
500
|
|
|
445
|
-
function serialNumberToDate(serial) {
|
|
446
|
-
if (serial < 60) {
|
|
447
|
-
serial += 1;
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
const utc_days = Math.floor(serial - 25569);
|
|
451
|
-
const utc_value = utc_days * 86400;
|
|
452
|
-
const date_info = new Date(utc_value * 1000);
|
|
453
|
-
const fractional_day = serial - Math.floor(serial) + 0.0000001;
|
|
454
|
-
|
|
455
|
-
let total_seconds = Math.floor(86400 * fractional_day);
|
|
456
|
-
|
|
457
|
-
const seconds = total_seconds % 60;
|
|
458
|
-
|
|
459
|
-
total_seconds -= seconds;
|
|
460
|
-
|
|
461
|
-
const hours = Math.floor(total_seconds / (60 * 60));
|
|
462
|
-
const minutes = Math.floor(total_seconds / 60) % 60;
|
|
463
|
-
let days = date_info.getUTCDate();
|
|
464
|
-
let month = date_info.getUTCMonth();
|
|
465
|
-
|
|
466
|
-
if (serial >= 60 && serial < 61) {
|
|
467
|
-
days = 29;
|
|
468
|
-
month = 1;
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
return new Date(date_info.getUTCFullYear(), month, days, hours, minutes, seconds)
|
|
472
|
-
}
|
|
473
|
-
|
|
474
501
|
// Parsers
|
|
475
502
|
function parseBool(bool) {
|
|
476
503
|
if (typeof bool === 'boolean') {
|
|
@@ -516,7 +543,7 @@ function parseDate(date) {
|
|
|
516
543
|
return num
|
|
517
544
|
}
|
|
518
545
|
|
|
519
|
-
return
|
|
546
|
+
return serialToDate(d)
|
|
520
547
|
}
|
|
521
548
|
|
|
522
549
|
if (typeof date === 'string') {
|
|
@@ -677,20 +704,6 @@ function isDefined(arg) {
|
|
|
677
704
|
return arg !== undefined && arg !== null
|
|
678
705
|
}
|
|
679
706
|
|
|
680
|
-
// TODO
|
|
681
|
-
/**
|
|
682
|
-
* -- Not implemented --
|
|
683
|
-
*
|
|
684
|
-
* Returns information about the formatting, location, or contents of a value.
|
|
685
|
-
*
|
|
686
|
-
* Category: Information
|
|
687
|
-
*
|
|
688
|
-
* @returns
|
|
689
|
-
*/
|
|
690
|
-
function CELL() {
|
|
691
|
-
throw new Error('CELL is not implemented')
|
|
692
|
-
}
|
|
693
|
-
|
|
694
707
|
const ERROR = {};
|
|
695
708
|
|
|
696
709
|
ERROR.TYPE = (error_val) => {
|
|
@@ -716,20 +729,6 @@ ERROR.TYPE = (error_val) => {
|
|
|
716
729
|
return na
|
|
717
730
|
};
|
|
718
731
|
|
|
719
|
-
// TODO
|
|
720
|
-
/**
|
|
721
|
-
* -- Not implemented --
|
|
722
|
-
*
|
|
723
|
-
* Returns information about the current operating environment.
|
|
724
|
-
*
|
|
725
|
-
* Category: Information
|
|
726
|
-
*
|
|
727
|
-
* @returns
|
|
728
|
-
*/
|
|
729
|
-
function INFO() {
|
|
730
|
-
throw new Error('INFO is not implemented')
|
|
731
|
-
}
|
|
732
|
-
|
|
733
732
|
/**
|
|
734
733
|
* Returns TRUE if the value is blank.
|
|
735
734
|
*
|
|
@@ -781,21 +780,6 @@ function ISEVEN(number) {
|
|
|
781
780
|
return !(Math.floor(Math.abs(number)) & 1)
|
|
782
781
|
}
|
|
783
782
|
|
|
784
|
-
// TODO
|
|
785
|
-
/**
|
|
786
|
-
* -- Not implemented --
|
|
787
|
-
*
|
|
788
|
-
* Returns TRUE if there is a reference to a value that contains a formula.
|
|
789
|
-
*
|
|
790
|
-
* Category: Information
|
|
791
|
-
*
|
|
792
|
-
* @param {*} reference Reference is a reference to the value you want to test. Reference can be a value reference, a formula, or a name that refers to a value.
|
|
793
|
-
* @returns
|
|
794
|
-
*/
|
|
795
|
-
function ISFORMULA() {
|
|
796
|
-
throw new Error('ISFORMULA is not implemented')
|
|
797
|
-
}
|
|
798
|
-
|
|
799
783
|
/**
|
|
800
784
|
* Returns TRUE if the value is a logical value.
|
|
801
785
|
*
|
|
@@ -856,21 +840,6 @@ function ISODD(value) {
|
|
|
856
840
|
return !!(Math.floor(Math.abs(value)) & 1)
|
|
857
841
|
}
|
|
858
842
|
|
|
859
|
-
// TODO
|
|
860
|
-
/**
|
|
861
|
-
* -- Not implemented --
|
|
862
|
-
*
|
|
863
|
-
* Returns TRUE if the value is a reference.
|
|
864
|
-
*
|
|
865
|
-
* Category: Information
|
|
866
|
-
*
|
|
867
|
-
* @param {*} value The value that you want tested. The value argument can be a blank (empty value), error, logical value, text, number, or reference value, or a name referring to any of these.
|
|
868
|
-
* @returns
|
|
869
|
-
*/
|
|
870
|
-
function ISREF() {
|
|
871
|
-
throw new Error('ISREF is not implemented')
|
|
872
|
-
}
|
|
873
|
-
|
|
874
843
|
/**
|
|
875
844
|
* Returns TRUE if the value is text.
|
|
876
845
|
*
|
|
@@ -926,36 +895,6 @@ function NA() {
|
|
|
926
895
|
return na
|
|
927
896
|
}
|
|
928
897
|
|
|
929
|
-
// TODO
|
|
930
|
-
/**
|
|
931
|
-
* -- Not implemented --
|
|
932
|
-
*
|
|
933
|
-
* Returns the sheet number of the referenced sheet.
|
|
934
|
-
*
|
|
935
|
-
* Category: Information
|
|
936
|
-
*
|
|
937
|
-
* @param {*} value Optional. Value is the name of a sheet or a reference for which you want the sheet number. If value is omitted, SHEET returns the number of the sheet that contains the function.
|
|
938
|
-
* @returns
|
|
939
|
-
*/
|
|
940
|
-
function SHEET() {
|
|
941
|
-
throw new Error('SHEET is not implemented')
|
|
942
|
-
}
|
|
943
|
-
|
|
944
|
-
// TODO
|
|
945
|
-
/**
|
|
946
|
-
* -- Not implemented --
|
|
947
|
-
*
|
|
948
|
-
* Returns the number of sheets in a reference.
|
|
949
|
-
*
|
|
950
|
-
* Category: Information
|
|
951
|
-
*
|
|
952
|
-
* @param {*} reference Optional. Reference is a reference for which you want to know the number of sheets it contains. If Reference is omitted, SHEETS returns the number of sheets in the workbook that contains the function.
|
|
953
|
-
* @returns
|
|
954
|
-
*/
|
|
955
|
-
function SHEETS() {
|
|
956
|
-
throw new Error('SHEETS is not implemented')
|
|
957
|
-
}
|
|
958
|
-
|
|
959
898
|
/**
|
|
960
899
|
* Returns a number indicating the data type of a value.
|
|
961
900
|
*
|
|
@@ -1425,36 +1364,6 @@ function VLOOKUP(lookup_value, table_array, col_index_num, range_lookup) {
|
|
|
1425
1364
|
return result
|
|
1426
1365
|
}
|
|
1427
1366
|
|
|
1428
|
-
// TODO
|
|
1429
|
-
/**
|
|
1430
|
-
* -- Not implemented --
|
|
1431
|
-
*
|
|
1432
|
-
* Changes full-width (double-byte) English letters or katakana within a character string to half-width (single-byte) characters.
|
|
1433
|
-
*
|
|
1434
|
-
* Category: Text
|
|
1435
|
-
*
|
|
1436
|
-
* @param {*} text The text or a reference to a value that contains the text you want to change. If text does not contain any full-width letters, text is not changed.
|
|
1437
|
-
* @returns
|
|
1438
|
-
*/
|
|
1439
|
-
function ASC() {
|
|
1440
|
-
throw new Error('ASC is not implemented')
|
|
1441
|
-
}
|
|
1442
|
-
|
|
1443
|
-
// TODO
|
|
1444
|
-
/**
|
|
1445
|
-
* -- Not implemented --
|
|
1446
|
-
*
|
|
1447
|
-
* Converts a number to text, using the ß (baht) currency format.
|
|
1448
|
-
*
|
|
1449
|
-
* Category: Text
|
|
1450
|
-
*
|
|
1451
|
-
* @param {*} number A number you want to convert to text, or a reference to a value containing a number, or a formula that evaluates to a number.
|
|
1452
|
-
* @returns
|
|
1453
|
-
*/
|
|
1454
|
-
function BAHTTEXT() {
|
|
1455
|
-
throw new Error('BAHTTEXT is not implemented')
|
|
1456
|
-
}
|
|
1457
|
-
|
|
1458
1367
|
/**
|
|
1459
1368
|
* Returns the character specified by the code number.
|
|
1460
1369
|
*
|
|
@@ -1551,21 +1460,6 @@ function CONCATENATE() {
|
|
|
1551
1460
|
|
|
1552
1461
|
const CONCAT = CONCATENATE;
|
|
1553
1462
|
|
|
1554
|
-
// TODO
|
|
1555
|
-
/**
|
|
1556
|
-
* -- Not implemented --
|
|
1557
|
-
*
|
|
1558
|
-
* Changes half-width (single-byte) English letters or katakana within a character string to full-width (double-byte) characters.
|
|
1559
|
-
*
|
|
1560
|
-
* Category: Text
|
|
1561
|
-
*
|
|
1562
|
-
* @param {*} text The text or a reference to a value that contains the text you want to change. If text does not contain any half-width English letters or katakana, text is not changed.
|
|
1563
|
-
* @returns
|
|
1564
|
-
*/
|
|
1565
|
-
function DBCS() {
|
|
1566
|
-
throw new Error('DBCS is not implemented')
|
|
1567
|
-
}
|
|
1568
|
-
|
|
1569
1463
|
/**
|
|
1570
1464
|
* Converts a number to text, using the $ (dollar) currency format.
|
|
1571
1465
|
*
|
|
@@ -1822,14 +1716,6 @@ function NUMBERVALUE(text, decimal_separator, group_separator) {
|
|
|
1822
1716
|
return Number(text.replace(decimal_separator, '.').replace(group_separator, ''))
|
|
1823
1717
|
}
|
|
1824
1718
|
|
|
1825
|
-
// TODO
|
|
1826
|
-
/**
|
|
1827
|
-
* -- Not implemented --
|
|
1828
|
-
*/
|
|
1829
|
-
function PRONETIC() {
|
|
1830
|
-
throw new Error('PRONETIC is not implemented')
|
|
1831
|
-
}
|
|
1832
|
-
|
|
1833
1719
|
/**
|
|
1834
1720
|
* Capitalizes the first letter in each word of a text value.
|
|
1835
1721
|
*
|
|
@@ -7621,7 +7507,6 @@ var symbols = /*#__PURE__*/Object.freeze({
|
|
|
7621
7507
|
POW: POW
|
|
7622
7508
|
});
|
|
7623
7509
|
|
|
7624
|
-
const d1900 = new Date(Date.UTC(1900, 0, 1));
|
|
7625
7510
|
const WEEK_STARTS = [
|
|
7626
7511
|
undefined,
|
|
7627
7512
|
0,
|
|
@@ -7711,7 +7596,7 @@ function DATE(year, month, day) {
|
|
|
7711
7596
|
}
|
|
7712
7597
|
}
|
|
7713
7598
|
|
|
7714
|
-
return result
|
|
7599
|
+
return returnSerial ? dateToSerial(result) : result
|
|
7715
7600
|
}
|
|
7716
7601
|
|
|
7717
7602
|
/**
|
|
@@ -7817,7 +7702,9 @@ function DATEVALUE(date_text) {
|
|
|
7817
7702
|
return value
|
|
7818
7703
|
}
|
|
7819
7704
|
|
|
7820
|
-
|
|
7705
|
+
const dateValue = new Date(date_text);
|
|
7706
|
+
|
|
7707
|
+
return returnSerial ? dateToSerial(dateValue) : dateValue
|
|
7821
7708
|
}
|
|
7822
7709
|
|
|
7823
7710
|
/**
|
|
@@ -7866,7 +7753,7 @@ function DAYS(end_date, start_date) {
|
|
|
7866
7753
|
return start_date
|
|
7867
7754
|
}
|
|
7868
7755
|
|
|
7869
|
-
return
|
|
7756
|
+
return dateToSerial(startOfDay(end_date)) - dateToSerial(startOfDay(start_date))
|
|
7870
7757
|
}
|
|
7871
7758
|
|
|
7872
7759
|
/**
|
|
@@ -7966,7 +7853,7 @@ function EDATE(start_date, months) {
|
|
|
7966
7853
|
|
|
7967
7854
|
start_date.setDate(storedDay);
|
|
7968
7855
|
|
|
7969
|
-
return start_date
|
|
7856
|
+
return returnSerial ? dateToSerial(start_date) : start_date
|
|
7970
7857
|
}
|
|
7971
7858
|
|
|
7972
7859
|
/**
|
|
@@ -7991,7 +7878,9 @@ function EOMONTH(start_date, months) {
|
|
|
7991
7878
|
|
|
7992
7879
|
months = parseInt(months, 10);
|
|
7993
7880
|
|
|
7994
|
-
|
|
7881
|
+
const eoMonth = new Date(start_date.getFullYear(), start_date.getMonth() + months + 1, 0);
|
|
7882
|
+
|
|
7883
|
+
return returnSerial ? dateToSerial(eoMonth) : eoMonth
|
|
7995
7884
|
}
|
|
7996
7885
|
|
|
7997
7886
|
/**
|
|
@@ -8187,7 +8076,7 @@ NETWORKDAYS.INTL = (start_date, end_date, weekend, holidays) => {
|
|
|
8187
8076
|
* @returns
|
|
8188
8077
|
*/
|
|
8189
8078
|
function NOW() {
|
|
8190
|
-
return new Date()
|
|
8079
|
+
return returnSerial ? dateToSerial(new Date()) : new Date()
|
|
8191
8080
|
}
|
|
8192
8081
|
|
|
8193
8082
|
/**
|
|
@@ -8260,7 +8149,8 @@ function TIMEVALUE(time_text) {
|
|
|
8260
8149
|
* @returns
|
|
8261
8150
|
*/
|
|
8262
8151
|
function TODAY() {
|
|
8263
|
-
|
|
8152
|
+
const today = startOfDay(new Date());
|
|
8153
|
+
return returnSerial ? dateToSerial(today) : today
|
|
8264
8154
|
}
|
|
8265
8155
|
|
|
8266
8156
|
/**
|
|
@@ -8540,12 +8430,6 @@ function YEARFRAC(start_date, end_date, basis) {
|
|
|
8540
8430
|
}
|
|
8541
8431
|
}
|
|
8542
8432
|
|
|
8543
|
-
function serial(date) {
|
|
8544
|
-
const addOn = date > -22038912e5 ? 2 : 1;
|
|
8545
|
-
|
|
8546
|
-
return Math.ceil((date - d1900) / 86400000) + addOn
|
|
8547
|
-
}
|
|
8548
|
-
|
|
8549
8433
|
function isValidBinaryNumber(number) {
|
|
8550
8434
|
return /^[01]{1,10}$/.test(number)
|
|
8551
8435
|
}
|
|
@@ -9481,22 +9365,6 @@ function ERF(lower_limit, upper_limit) {
|
|
|
9481
9365
|
return jStat.erf(lower_limit)
|
|
9482
9366
|
}
|
|
9483
9367
|
|
|
9484
|
-
// TODO
|
|
9485
|
-
|
|
9486
|
-
/**
|
|
9487
|
-
* -- Not implemented --
|
|
9488
|
-
*
|
|
9489
|
-
* Returns the error function.
|
|
9490
|
-
*
|
|
9491
|
-
* Category: Engineering
|
|
9492
|
-
*
|
|
9493
|
-
* @param {*} x The lower bound for integrating ERF.PRECISE.
|
|
9494
|
-
* @returns
|
|
9495
|
-
*/
|
|
9496
|
-
ERF.PRECISE = () => {
|
|
9497
|
-
throw new Error('ERF.PRECISE is not implemented')
|
|
9498
|
-
};
|
|
9499
|
-
|
|
9500
9368
|
/**
|
|
9501
9369
|
* Returns the complementary error function.
|
|
9502
9370
|
*
|
|
@@ -9514,22 +9382,6 @@ function ERFC(x) {
|
|
|
9514
9382
|
return jStat.erfc(x)
|
|
9515
9383
|
}
|
|
9516
9384
|
|
|
9517
|
-
// TODO
|
|
9518
|
-
|
|
9519
|
-
/**
|
|
9520
|
-
* -- Not implemented --
|
|
9521
|
-
*
|
|
9522
|
-
* Returns the complementary ERF function integrated between x and infinity.
|
|
9523
|
-
*
|
|
9524
|
-
* Category: Engineering
|
|
9525
|
-
*
|
|
9526
|
-
* @param {*} x The lower bound for integrating ERFC.PRECISE.
|
|
9527
|
-
* @returns
|
|
9528
|
-
*/
|
|
9529
|
-
ERFC.PRECISE = () => {
|
|
9530
|
-
throw new Error('ERFC.PRECISE is not implemented')
|
|
9531
|
-
};
|
|
9532
|
-
|
|
9533
9385
|
/**
|
|
9534
9386
|
* Tests whether a number is greater than a threshold value.
|
|
9535
9387
|
*
|
|
@@ -11302,85 +11154,6 @@ function ACCRINT(issue, first_interest, settlement, rate, par, frequency, basis)
|
|
|
11302
11154
|
return par * rate * YEARFRAC(issue, settlement, basis)
|
|
11303
11155
|
}
|
|
11304
11156
|
|
|
11305
|
-
// TODO
|
|
11306
|
-
/**
|
|
11307
|
-
* -- Not implemented --
|
|
11308
|
-
*
|
|
11309
|
-
* Returns the accrued interest for a security that pays interest at maturity.
|
|
11310
|
-
*
|
|
11311
|
-
* Category: Financial
|
|
11312
|
-
*
|
|
11313
|
-
* @param {*} issue The security's issue date.
|
|
11314
|
-
* @param {*} settlement The security's maturity date.
|
|
11315
|
-
* @param {*} rate The security's annual coupon rate.
|
|
11316
|
-
* @param {*} par The security's par value. If you omit par, ACCRINTM uses $1,000.
|
|
11317
|
-
* @param {*} basis Optional. The type of day count basis to use.
|
|
11318
|
-
* @returns
|
|
11319
|
-
*/
|
|
11320
|
-
function ACCRINTM() {
|
|
11321
|
-
throw new Error('ACCRINTM is not implemented')
|
|
11322
|
-
}
|
|
11323
|
-
|
|
11324
|
-
// TODO
|
|
11325
|
-
/**
|
|
11326
|
-
* -- Not implemented --
|
|
11327
|
-
*
|
|
11328
|
-
* Returns the depreciation for each accounting period by using a depreciation coefficient.
|
|
11329
|
-
*
|
|
11330
|
-
* Category: Financial
|
|
11331
|
-
*
|
|
11332
|
-
* @param {*} cost The cost of the asset.
|
|
11333
|
-
* @param {*} date_purchased The date of the purchase of the asset.
|
|
11334
|
-
* @param {*} first_period The date of the end of the first period.
|
|
11335
|
-
* @param {*} salvage The salvage value at the end of the life of the asset.
|
|
11336
|
-
* @param {*} period The period.
|
|
11337
|
-
* @param {*} rate The rate of depreciation.
|
|
11338
|
-
* @param {*} basis Optional. The year basis to be used.
|
|
11339
|
-
* @returns
|
|
11340
|
-
*/
|
|
11341
|
-
function AMORDEGRC() {
|
|
11342
|
-
throw new Error('AMORDEGRC is not implemented')
|
|
11343
|
-
}
|
|
11344
|
-
|
|
11345
|
-
// TODO
|
|
11346
|
-
/**
|
|
11347
|
-
* -- Not implemented --
|
|
11348
|
-
*
|
|
11349
|
-
* Returns the depreciation for each accounting period.
|
|
11350
|
-
*
|
|
11351
|
-
* Category: Financial
|
|
11352
|
-
*
|
|
11353
|
-
* @param {*} cost The cost of the asset.
|
|
11354
|
-
* @param {*} date_purchased The date of the purchase of the asset.
|
|
11355
|
-
* @param {*} first_period The date of the end of the first period.
|
|
11356
|
-
* @param {*} salvage The salvage value at the end of the life of the asset.
|
|
11357
|
-
* @param {*} period The period.
|
|
11358
|
-
* @param {*} rate The rate of depreciation.
|
|
11359
|
-
* @param {*} basis Optional. The year basis to be used.
|
|
11360
|
-
* @returns
|
|
11361
|
-
*/
|
|
11362
|
-
function AMORLINC() {
|
|
11363
|
-
throw new Error('AMORLINC is not implemented')
|
|
11364
|
-
}
|
|
11365
|
-
|
|
11366
|
-
// TODO
|
|
11367
|
-
/**
|
|
11368
|
-
* -- Not implemented --
|
|
11369
|
-
*
|
|
11370
|
-
* Returns the number of days from the beginning of the coupon period to the settlement date.
|
|
11371
|
-
*
|
|
11372
|
-
* Category: Financial
|
|
11373
|
-
*
|
|
11374
|
-
* @param {*} settlement The security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
|
|
11375
|
-
* @param {*} maturity The security's maturity date. The maturity date is the date when the security expires.
|
|
11376
|
-
* @param {*} frequency The number of coupon payments per year. For annual payments, frequency = 1; for semiannual, frequency = 2; for quarterly, frequency = 4.
|
|
11377
|
-
* @param {*} basis Optional. The type of day count basis to use.
|
|
11378
|
-
* @returns
|
|
11379
|
-
*/
|
|
11380
|
-
function COUPDAYBS() {
|
|
11381
|
-
throw new Error('COUPDAYBS is not implemented')
|
|
11382
|
-
}
|
|
11383
|
-
|
|
11384
11157
|
/**
|
|
11385
11158
|
*
|
|
11386
11159
|
* Returns the number of days in the coupon period that contains the settlement date.
|
|
@@ -11435,78 +11208,6 @@ function COUPDAYS(settlement, maturity, frequency, basis) {
|
|
|
11435
11208
|
return numOfDays / frequency
|
|
11436
11209
|
}
|
|
11437
11210
|
|
|
11438
|
-
// TODO
|
|
11439
|
-
/**
|
|
11440
|
-
* -- Not implemented --
|
|
11441
|
-
*
|
|
11442
|
-
* Returns the number of days from the settlement date to the next coupon date.
|
|
11443
|
-
*
|
|
11444
|
-
* Category: Financial
|
|
11445
|
-
*
|
|
11446
|
-
* @param {*} settlement The security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
|
|
11447
|
-
* @param {*} maturity The security's maturity date. The maturity date is the date when the security expires.
|
|
11448
|
-
* @param {*} frequency The number of coupon payments per year. For annual payments, frequency = 1; for semiannual, frequency = 2; for quarterly, frequency = 4.
|
|
11449
|
-
* @param {*} basis Optional. The type of day count basis to use.
|
|
11450
|
-
* @returns
|
|
11451
|
-
*/
|
|
11452
|
-
function COUPDAYSNC() {
|
|
11453
|
-
throw new Error('COUPDAYSNC is not implemented')
|
|
11454
|
-
}
|
|
11455
|
-
|
|
11456
|
-
// TODO
|
|
11457
|
-
/**
|
|
11458
|
-
* -- Not implemented --
|
|
11459
|
-
*
|
|
11460
|
-
* Returns the next coupon date after the settlement date.
|
|
11461
|
-
*
|
|
11462
|
-
* Category: Financial
|
|
11463
|
-
*
|
|
11464
|
-
* @param {*} settlement The security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
|
|
11465
|
-
* @param {*} maturity The security's maturity date. The maturity date is the date when the security expires.
|
|
11466
|
-
* @param {*} frequency The number of coupon payments per year. For annual payments, frequency = 1; for semiannual, frequency = 2; for quarterly, frequency = 4.
|
|
11467
|
-
* @param {*} basis Optional. The type of day count basis to use.
|
|
11468
|
-
* @returns
|
|
11469
|
-
*/
|
|
11470
|
-
function COUPNCD() {
|
|
11471
|
-
throw new Error('COUPNCD is not implemented')
|
|
11472
|
-
}
|
|
11473
|
-
|
|
11474
|
-
// TODO
|
|
11475
|
-
/**
|
|
11476
|
-
* -- Not implemented --
|
|
11477
|
-
*
|
|
11478
|
-
* Returns the number of coupons payable between the settlement date and maturity date.
|
|
11479
|
-
*
|
|
11480
|
-
* Category: Financial
|
|
11481
|
-
*
|
|
11482
|
-
* @param {*} settlement The security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
|
|
11483
|
-
* @param {*} maturity The security's maturity date. The maturity date is the date when the security expires.
|
|
11484
|
-
* @param {*} frequency The number of coupon payments per year. For annual payments, frequency = 1; for semiannual, frequency = 2; for quarterly, frequency = 4.
|
|
11485
|
-
* @param {*} basis Optional. The type of day count basis to use.
|
|
11486
|
-
* @returns
|
|
11487
|
-
*/
|
|
11488
|
-
function COUPNUM() {
|
|
11489
|
-
throw new Error('COUPNUM is not implemented')
|
|
11490
|
-
}
|
|
11491
|
-
|
|
11492
|
-
// TODO
|
|
11493
|
-
/**
|
|
11494
|
-
* -- Not implemented --
|
|
11495
|
-
*
|
|
11496
|
-
* Returns the previous coupon date before the settlement date.
|
|
11497
|
-
*
|
|
11498
|
-
* Category: Financial
|
|
11499
|
-
*
|
|
11500
|
-
* @param {*} settlement The security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
|
|
11501
|
-
* @param {*} maturity The security's maturity date. The maturity date is the date when the security expires.
|
|
11502
|
-
* @param {*} frequency The number of coupon payments per year. For annual payments, frequency = 1; for semiannual, frequency = 2; for quarterly, frequency = 4.
|
|
11503
|
-
* @param {*} basis Optional. The type of day count basis to use.
|
|
11504
|
-
* @returns
|
|
11505
|
-
*/
|
|
11506
|
-
function COUPPCD() {
|
|
11507
|
-
throw new Error('COUPPCD is not implemented')
|
|
11508
|
-
}
|
|
11509
|
-
|
|
11510
11211
|
/**
|
|
11511
11212
|
* Returns the cumulative interest paid between two periods.
|
|
11512
11213
|
*
|
|
@@ -11898,26 +11599,6 @@ function DOLLARFR(decimal_dollar, fraction) {
|
|
|
11898
11599
|
return result
|
|
11899
11600
|
}
|
|
11900
11601
|
|
|
11901
|
-
// TODO
|
|
11902
|
-
/**
|
|
11903
|
-
* -- Not implemented --
|
|
11904
|
-
*
|
|
11905
|
-
* Returns the annual duration of a security with periodic interest payments.
|
|
11906
|
-
*
|
|
11907
|
-
* Category: Financial
|
|
11908
|
-
*
|
|
11909
|
-
* @param {*} settlement The security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
|
|
11910
|
-
* @param {*} maturity The security's maturity date. The maturity date is the date when the security expires.
|
|
11911
|
-
* @param {*} coupon The security's annual coupon rate.
|
|
11912
|
-
* @param {*} yld The security's annual yield.
|
|
11913
|
-
* @param {*} frequency The number of coupon payments per year. For annual payments, frequency = 1; for semiannual, frequency = 2; for quarterly, frequency = 4.
|
|
11914
|
-
* @param {*} basis Optional. The type of day count basis to use.
|
|
11915
|
-
* @returns
|
|
11916
|
-
*/
|
|
11917
|
-
function DURATION() {
|
|
11918
|
-
throw new Error('DURATION is not implemented')
|
|
11919
|
-
}
|
|
11920
|
-
|
|
11921
11602
|
/**
|
|
11922
11603
|
* Returns the effective annual interest rate.
|
|
11923
11604
|
*
|
|
@@ -12022,25 +11703,6 @@ function FVSCHEDULE(principal, schedule) {
|
|
|
12022
11703
|
return future
|
|
12023
11704
|
}
|
|
12024
11705
|
|
|
12025
|
-
// TODO
|
|
12026
|
-
/**
|
|
12027
|
-
* -- Not implemented --
|
|
12028
|
-
*
|
|
12029
|
-
* Returns the interest rate for a fully invested security.
|
|
12030
|
-
*
|
|
12031
|
-
* Category: Financial
|
|
12032
|
-
*
|
|
12033
|
-
* @param {*} settlement The security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
|
|
12034
|
-
* @param {*} maturity The security's maturity date. The maturity date is the date when the security expires.
|
|
12035
|
-
* @param {*} investment The amount invested in the security.
|
|
12036
|
-
* @param {*} redemption The amount to be received at maturity.
|
|
12037
|
-
* @param {*} basis Optional. The type of day count basis to use.
|
|
12038
|
-
* @returns
|
|
12039
|
-
*/
|
|
12040
|
-
function INTRATE() {
|
|
12041
|
-
throw new Error('INTRATE is not implemented')
|
|
12042
|
-
}
|
|
12043
|
-
|
|
12044
11706
|
/**
|
|
12045
11707
|
* Returns the interest payment for an investment for a given period.
|
|
12046
11708
|
*
|
|
@@ -12295,26 +11957,6 @@ function ISPMT(rate, per, nper, pv) {
|
|
|
12295
11957
|
return pv * rate * (per / nper - 1)
|
|
12296
11958
|
}
|
|
12297
11959
|
|
|
12298
|
-
// TODO
|
|
12299
|
-
/**
|
|
12300
|
-
* -- Not implemented --
|
|
12301
|
-
*
|
|
12302
|
-
* Returns the Macauley modified duration for a security with an assumed par value of $100.
|
|
12303
|
-
*
|
|
12304
|
-
* Category: Financial
|
|
12305
|
-
*
|
|
12306
|
-
* @param {*} settlement The security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
|
|
12307
|
-
* @param {*} maturity The security's maturity date. The maturity date is the date when the security expires.
|
|
12308
|
-
* @param {*} coupon The security's annual coupon rate.
|
|
12309
|
-
* @param {*} yld The security's annual yield.
|
|
12310
|
-
* @param {*} frequency The number of coupon payments per year. For annual payments, frequency = 1; for semiannual, frequency = 2; for quarterly, frequency = 4.
|
|
12311
|
-
* @param {*} basis Optional. The type of day count basis to use.
|
|
12312
|
-
* @returns
|
|
12313
|
-
*/
|
|
12314
|
-
function MDURATION() {
|
|
12315
|
-
throw new Error('MDURATION is not implemented')
|
|
12316
|
-
}
|
|
12317
|
-
|
|
12318
11960
|
/**
|
|
12319
11961
|
* Returns the internal rate of return where positive and negative cash flows are financed at different rates.
|
|
12320
11962
|
*
|
|
@@ -12458,96 +12100,6 @@ function NPV() {
|
|
|
12458
12100
|
return value
|
|
12459
12101
|
}
|
|
12460
12102
|
|
|
12461
|
-
// TODO
|
|
12462
|
-
/**
|
|
12463
|
-
* -- Not implemented --
|
|
12464
|
-
*
|
|
12465
|
-
* Returns the price per $100 face value of a security with an odd first period.
|
|
12466
|
-
*
|
|
12467
|
-
* Category: Financial
|
|
12468
|
-
*
|
|
12469
|
-
* @param {*} settlement The security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
|
|
12470
|
-
* @param {*} maturity The security's maturity date. The maturity date is the date when the security expires.
|
|
12471
|
-
* @param {*} issue The security's issue date.
|
|
12472
|
-
* @param {*} first_coupon The security's first coupon date.
|
|
12473
|
-
* @param {*} rate The security's interest rate.
|
|
12474
|
-
* @param {*} yld The security's annual yield.
|
|
12475
|
-
* @param {*} redemption The security's redemption value per $100 face value.
|
|
12476
|
-
* @param {*} frequency The number of coupon payments per year. For annual payments, frequency = 1; for semiannual, frequency = 2; for quarterly, frequency = 4.
|
|
12477
|
-
* @param {*} basis Optional. The type of day count basis to use.
|
|
12478
|
-
* @returns
|
|
12479
|
-
*/
|
|
12480
|
-
function ODDFPRICE() {
|
|
12481
|
-
throw new Error('ODDFPRICE is not implemented')
|
|
12482
|
-
}
|
|
12483
|
-
|
|
12484
|
-
// TODO
|
|
12485
|
-
/**
|
|
12486
|
-
* -- Not implemented --
|
|
12487
|
-
*
|
|
12488
|
-
* Returns the yield of a security with an odd first period.
|
|
12489
|
-
*
|
|
12490
|
-
* Category: Financial
|
|
12491
|
-
*
|
|
12492
|
-
* @param {*} settlement The security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
|
|
12493
|
-
* @param {*} maturity The security's maturity date. The maturity date is the date when the security expires.
|
|
12494
|
-
* @param {*} issue The security's issue date.
|
|
12495
|
-
* @param {*} first_coupon The security's first coupon date.
|
|
12496
|
-
* @param {*} rate The security's interest rate.
|
|
12497
|
-
* @param {*} pr The security's price.
|
|
12498
|
-
* @param {*} redemption The security's redemption value per $100 face value.
|
|
12499
|
-
* @param {*} frequency The number of coupon payments per year. For annual payments, frequency = 1; for semiannual, frequency = 2; for quarterly, frequency = 4.
|
|
12500
|
-
* @param {*} basis Optional. The type of day count basis to use.
|
|
12501
|
-
* @returns
|
|
12502
|
-
*/
|
|
12503
|
-
function ODDFYIELD() {
|
|
12504
|
-
throw new Error('ODDFYIELD is not implemented')
|
|
12505
|
-
}
|
|
12506
|
-
|
|
12507
|
-
// TODO
|
|
12508
|
-
/**
|
|
12509
|
-
* -- Not implemented --
|
|
12510
|
-
*
|
|
12511
|
-
* Returns the price per $100 face value of a security with an odd last period.
|
|
12512
|
-
*
|
|
12513
|
-
* Category: Financial
|
|
12514
|
-
*
|
|
12515
|
-
* @param {*} settlement The security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
|
|
12516
|
-
* @param {*} maturity The security's maturity date. The maturity date is the date when the security expires.
|
|
12517
|
-
* @param {*} last_interest The security's last coupon date.
|
|
12518
|
-
* @param {*} rate The security's interest rate.
|
|
12519
|
-
* @param {*} yld The security's annual yield.
|
|
12520
|
-
* @param {*} redemption The security's redemption value per $100 face value.
|
|
12521
|
-
* @param {*} frequency The number of coupon payments per year. For annual payments, frequency = 1; for semiannual, frequency = 2; for quarterly, frequency = 4.
|
|
12522
|
-
* @param {*} basis Optional. The type of day count basis to use.
|
|
12523
|
-
* @returns
|
|
12524
|
-
*/
|
|
12525
|
-
function ODDLPRICE() {
|
|
12526
|
-
throw new Error('ODDLPRICE is not implemented')
|
|
12527
|
-
}
|
|
12528
|
-
|
|
12529
|
-
// TODO
|
|
12530
|
-
/**
|
|
12531
|
-
* -- Not implemented --
|
|
12532
|
-
*
|
|
12533
|
-
* Returns the yield of a security with an odd last period.
|
|
12534
|
-
*
|
|
12535
|
-
* Category: Financial
|
|
12536
|
-
*
|
|
12537
|
-
* @param {*} settlement The security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
|
|
12538
|
-
* @param {*} maturity The security's maturity date. The maturity date is the date when the security expires.
|
|
12539
|
-
* @param {*} last_interest The security's last coupon date.
|
|
12540
|
-
* @param {*} rate The security's interest rate
|
|
12541
|
-
* @param {*} pr The security's price.
|
|
12542
|
-
* @param {*} redemption The security's redemption value per $100 face value.
|
|
12543
|
-
* @param {*} frequency The number of coupon payments per year. For annual payments, frequency = 1; for semiannual, frequency = 2; for quarterly, frequency = 4.
|
|
12544
|
-
* @param {*} basis Optional. The type of day count basis to use.
|
|
12545
|
-
* @returns
|
|
12546
|
-
*/
|
|
12547
|
-
function ODDLYIELD() {
|
|
12548
|
-
throw new Error('ODDLYIELD is not implemented')
|
|
12549
|
-
}
|
|
12550
|
-
|
|
12551
12103
|
/**
|
|
12552
12104
|
* Returns the number of periods required by an investment to reach a specified value.
|
|
12553
12105
|
*
|
|
@@ -12650,27 +12202,6 @@ function PPMT(rate, per, nper, pv, fv, type) {
|
|
|
12650
12202
|
return PMT(rate, nper, pv, fv, type) - IPMT(rate, per, nper, pv, fv, type)
|
|
12651
12203
|
}
|
|
12652
12204
|
|
|
12653
|
-
// TODO
|
|
12654
|
-
/**
|
|
12655
|
-
* -- Not implemented --
|
|
12656
|
-
*
|
|
12657
|
-
* Returns the price per $100 face value of a security that pays periodic interest.
|
|
12658
|
-
*
|
|
12659
|
-
* Category: Financial
|
|
12660
|
-
*
|
|
12661
|
-
* @param {*} settlement The security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
|
|
12662
|
-
* @param {*} maturity The security's maturity date. The maturity date is the date when the security expires.
|
|
12663
|
-
* @param {*} rate The security's annual coupon rate.
|
|
12664
|
-
* @param {*} yld The security's annual yield.
|
|
12665
|
-
* @param {*} redemption The security's redemption value per $100 face value.
|
|
12666
|
-
* @param {*} frequency The number of coupon payments per year. For annual payments, frequency = 1; for semiannual, frequency = 2; for quarterly, frequency = 4.
|
|
12667
|
-
* @param {*} basis Optional. The type of day count basis to use.
|
|
12668
|
-
* @returns
|
|
12669
|
-
*/
|
|
12670
|
-
function PRICE() {
|
|
12671
|
-
throw new Error('PRICE is not implemented')
|
|
12672
|
-
}
|
|
12673
|
-
|
|
12674
12205
|
/**
|
|
12675
12206
|
* Returns the price per $100 face value of a discounted security.
|
|
12676
12207
|
*
|
|
@@ -12733,26 +12264,6 @@ function PRICEDISC(settlement, maturity, discount, redemption, basis) {
|
|
|
12733
12264
|
return redemption - (discount * redemption * diff) / basisVal
|
|
12734
12265
|
}
|
|
12735
12266
|
|
|
12736
|
-
// TODO
|
|
12737
|
-
/**
|
|
12738
|
-
* -- Not implemented --
|
|
12739
|
-
*
|
|
12740
|
-
* Returns the price per $100 face value of a security that pays interest at maturity.
|
|
12741
|
-
*
|
|
12742
|
-
* Category: Financial
|
|
12743
|
-
*
|
|
12744
|
-
* @param {*} settlement The security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
|
|
12745
|
-
* @param {*} maturity The security's maturity date. The maturity date is the date when the security expires.
|
|
12746
|
-
* @param {*} issue The security's issue date, expressed as a serial date number.
|
|
12747
|
-
* @param {*} rate The security's interest rate at date of issue.
|
|
12748
|
-
* @param {*} yld The security's annual yield.
|
|
12749
|
-
* @param {*} basis Optional. The type of day count basis to use.
|
|
12750
|
-
* @returns
|
|
12751
|
-
*/
|
|
12752
|
-
function PRICEMAT() {
|
|
12753
|
-
throw new Error('PRICEMAT is not implemented')
|
|
12754
|
-
}
|
|
12755
|
-
|
|
12756
12267
|
/**
|
|
12757
12268
|
* Returns the present value of an investment.
|
|
12758
12269
|
*
|
|
@@ -12856,25 +12367,6 @@ function RATE(nper, pmt, pv, fv, type, guess) {
|
|
|
12856
12367
|
return rate
|
|
12857
12368
|
}
|
|
12858
12369
|
|
|
12859
|
-
// TODO
|
|
12860
|
-
/**
|
|
12861
|
-
* -- Not implemented --
|
|
12862
|
-
*
|
|
12863
|
-
* Returns the amount received at maturity for a fully invested security.
|
|
12864
|
-
*
|
|
12865
|
-
* Category: Financial
|
|
12866
|
-
*
|
|
12867
|
-
* @param {*} settlement The security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
|
|
12868
|
-
* @param {*} maturity The security's maturity date. The maturity date is the date when the security expires.
|
|
12869
|
-
* @param {*} investment The amount invested in the security.
|
|
12870
|
-
* @param {*} discount The security's discount rate.
|
|
12871
|
-
* @param {*} basis Optional. The type of day count basis to use.
|
|
12872
|
-
* @returns
|
|
12873
|
-
*/
|
|
12874
|
-
function RECEIVED() {
|
|
12875
|
-
throw new Error('RECEIVED is not implemented')
|
|
12876
|
-
}
|
|
12877
|
-
|
|
12878
12370
|
/**
|
|
12879
12371
|
* Returns an equivalent interest rate for the growth of an investment.
|
|
12880
12372
|
*
|
|
@@ -13084,29 +12576,6 @@ function TBILLYIELD(settlement, maturity, pr) {
|
|
|
13084
12576
|
return ((100 - pr) * 360) / (pr * DAYS360(settlement, maturity, false))
|
|
13085
12577
|
}
|
|
13086
12578
|
|
|
13087
|
-
// TODO
|
|
13088
|
-
/**
|
|
13089
|
-
* -- Not implemented --
|
|
13090
|
-
*
|
|
13091
|
-
* Returns the depreciation of an asset for a specified or partial period by using a declining balance method.
|
|
13092
|
-
*
|
|
13093
|
-
* Category: Financial
|
|
13094
|
-
*
|
|
13095
|
-
* @param {*} cost The initial cost of the asset.
|
|
13096
|
-
* @param {*} salvage The value at the end of the depreciation (sometimes called the salvage value of the asset). This value can be 0.
|
|
13097
|
-
* @param {*} life The number of periods over which the asset is depreciated (sometimes called the useful life of the asset).
|
|
13098
|
-
* @param {*} start_period The starting period for which you want to calculate the depreciation. Start_period must use the same units as life.
|
|
13099
|
-
* @param {*} end_period The ending period for which you want to calculate the depreciation. End_period must use the same units as life.
|
|
13100
|
-
* @param {*} factor Optional. The rate at which the balance declines. If factor is omitted, it is assumed to be 2 (the double-declining balance method). Change factor if you do not want to use the double-declining balance method. For a description of the double-declining balance method, see DDB.
|
|
13101
|
-
* @param {*} no_switch Optional. A logical value specifying whether to switch to straight-line depreciation when depreciation is greater than the declining balance calculation.
|
|
13102
|
-
- If no_switch is TRUE, Microsoft Excel does not switch to straight-line depreciation even when the depreciation is greater than the declining balance calculation.
|
|
13103
|
-
- If no_switch is FALSE or omitted, Excel switches to straight-line depreciation when depreciation is greater than the declining balance calculation.
|
|
13104
|
-
* @returns
|
|
13105
|
-
*/
|
|
13106
|
-
function VDB() {
|
|
13107
|
-
throw new Error('VDB is not implemented')
|
|
13108
|
-
}
|
|
13109
|
-
|
|
13110
12579
|
/**
|
|
13111
12580
|
* Returns the internal rate of return for a schedule of cash flows that is not necessarily periodic.
|
|
13112
12581
|
*
|
|
@@ -13222,66 +12691,6 @@ function XNPV(rate, values, dates) {
|
|
|
13222
12691
|
return result
|
|
13223
12692
|
}
|
|
13224
12693
|
|
|
13225
|
-
// TODO
|
|
13226
|
-
/**
|
|
13227
|
-
* -- Not implemented --
|
|
13228
|
-
*
|
|
13229
|
-
* Returns the yield on a security that pays periodic interest.
|
|
13230
|
-
*
|
|
13231
|
-
* Category: Financial
|
|
13232
|
-
*
|
|
13233
|
-
* @param {*} settlement The security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
|
|
13234
|
-
* @param {*} maturity The security's maturity date. The maturity date is the date when the security expires.
|
|
13235
|
-
* @param {*} rate The security's annual coupon rate.
|
|
13236
|
-
* @param {*} pr The security's price per $100 face value.
|
|
13237
|
-
* @param {*} redemption The security's redemption value per $100 face value.
|
|
13238
|
-
* @param {*} frequency The number of coupon payments per year. For annual payments, frequency = 1; for semiannual, frequency = 2; for quarterly, frequency = 4.
|
|
13239
|
-
* @param {*} basis Optional. The type of day count basis to use.
|
|
13240
|
-
* @returns
|
|
13241
|
-
*/
|
|
13242
|
-
function YIELD() {
|
|
13243
|
-
throw new Error('YIELD is not implemented')
|
|
13244
|
-
}
|
|
13245
|
-
|
|
13246
|
-
// TODO
|
|
13247
|
-
/**
|
|
13248
|
-
* -- Not implemented --
|
|
13249
|
-
*
|
|
13250
|
-
* Returns the annual yield for a discounted security; for example, a Treasury bill.
|
|
13251
|
-
*
|
|
13252
|
-
* Category: Financial
|
|
13253
|
-
*
|
|
13254
|
-
* @param {*} settlement The security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
|
|
13255
|
-
* @param {*} maturity The security's maturity date. The maturity date is the date when the security expires.
|
|
13256
|
-
* @param {*} pr The security's price per $100 face value.
|
|
13257
|
-
* @param {*} redemption The security's redemption value per $100 face value.
|
|
13258
|
-
* @param {*} basis Optional. The type of day count basis to use.
|
|
13259
|
-
* @returns
|
|
13260
|
-
*/
|
|
13261
|
-
function YIELDDISC() {
|
|
13262
|
-
throw new Error('YIELDDISC is not implemented')
|
|
13263
|
-
}
|
|
13264
|
-
|
|
13265
|
-
// TODO
|
|
13266
|
-
/**
|
|
13267
|
-
* -- Not implemented --
|
|
13268
|
-
*
|
|
13269
|
-
* Returns the annual yield of a security that pays interest at maturity.
|
|
13270
|
-
*
|
|
13271
|
-
* Category: Financial
|
|
13272
|
-
*
|
|
13273
|
-
* @param {*} settlement The security's settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer.
|
|
13274
|
-
* @param {*} maturity The security's maturity date. The maturity date is the date when the security expires.
|
|
13275
|
-
* @param {*} issue The security's issue date, expressed as a serial date number.
|
|
13276
|
-
* @param {*} rate The security's interest rate at date of issue.
|
|
13277
|
-
* @param {*} pr The security's price per $100 face value.
|
|
13278
|
-
* @param {*} basis Optional. The type of day count basis to use.
|
|
13279
|
-
* @returns
|
|
13280
|
-
*/
|
|
13281
|
-
function YIELDMAT() {
|
|
13282
|
-
throw new Error('YIELDMAT is not implemented')
|
|
13283
|
-
}
|
|
13284
|
-
|
|
13285
12694
|
/**
|
|
13286
12695
|
* Returns TRUE if all of its arguments are TRUE.
|
|
13287
12696
|
*
|
|
@@ -13564,6 +12973,6 @@ async function GETTXLIST(address, page, offset) {
|
|
|
13564
12973
|
}
|
|
13565
12974
|
}
|
|
13566
12975
|
|
|
13567
|
-
const utils = { errors, symbols };
|
|
12976
|
+
const utils = { errors, symbols, date };
|
|
13568
12977
|
|
|
13569
|
-
export { ABS, ACCRINT,
|
|
12978
|
+
export { ABS, ACCRINT, ACOS, ACOSH, ACOT, ACOTH, AGGREGATE, AND, ARABIC, ASIN, ASINH, ATAN, ATAN2, ATANH, AVEDEV, AVERAGE, AVERAGEA, AVERAGEIF, AVERAGEIFS, BASE, BESSELI, BESSELJ, BESSELK, BESSELY, BETA, BETADIST, BETAINV, BIN2DEC, BIN2HEX, BIN2OCT, BINOM, BINOMDIST, BITAND, BITLSHIFT, BITOR, BITRSHIFT, BITXOR, CEILING, CEILINGMATH, CEILINGPRECISE, CHAR, CHIDIST, CHIDISTRT, CHIINV, CHIINVRT, CHISQ, CHITEST, CHOOSE, CLEAN, CODE, COLUMN, COLUMNS, COMBIN, COMBINA, COMPLEX, CONCAT, CONCATENATE, CONFIDENCE, CONVERT, CORREL, COS, COSH, COT, COTH, COUNT, COUNTA, COUNTBLANK, COUNTIF, COUNTIFS, COUPDAYS, COVAR, COVARIANCE, COVARIANCEP, COVARIANCES, CRITBINOM, CSC, CSCH, CUMIPMT, CUMPRINC, DATE, DATEDIF, DATEVALUE, DAVERAGE, DAY, DAYS, DAYS360, DB, DCOUNT, DCOUNTA, DDB, DEC2BIN, DEC2HEX, DEC2OCT, DECIMAL, DEGREES, DELTA, DEVSQ, DGET, DISC, DMAX, DMIN, DOLLAR, DOLLARDE, DOLLARFR, DPRODUCT, DSTDEV, DSTDEVP, DSUM, DVAR, DVARP, EDATE, EFFECT, EOMONTH, ERF, ERFC, ERFCPRECISE, ERFPRECISE, ERROR, EVEN, EXACT, EXP, EXPON, EXPONDIST, F, FACT, FACTDOUBLE, FALSE, FDIST, FDISTRT, FIND, FINV, FINVRT, FISHER, FISHERINV, FIXED, FLOOR, FLOORMATH, FLOORPRECISE, FORECAST, FREQUENCY, FTEST, FV, FVSCHEDULE, GAMMA, GAMMADIST, GAMMAINV, GAMMALN, GAMMALNPRECISE, GAUSS, GCD, GEOMEAN, GESTEP, GETTXLIST, GROWTH, HARMEAN, HEX2BIN, HEX2DEC, HEX2OCT, HLOOKUP, HOUR, HYPGEOM, HYPGEOMDIST, IF, IFERROR, IFNA, IFS, IMABS, IMAGINARY, IMARGUMENT, IMCONJUGATE, IMCOS, IMCOSH, IMCOT, IMCSC, IMCSCH, IMDIV, IMEXP, IMLN, IMLOG10, IMLOG2, IMPOWER, IMPRODUCT, IMREAL, IMSEC, IMSECH, IMSIN, IMSINH, IMSQRT, IMSUB, IMSUM, IMTAN, INDEX, INT, INTERCEPT, IPMT, IRR, ISBLANK, ISERR, ISERROR, ISEVEN, ISLOGICAL, ISNA, ISNONTEXT, ISNUMBER, ISO, ISODD, ISOWEEKNUM, ISPMT, ISTEXT, KURT, LARGE, LCM, LEFT, LEN, LINEST, LN, LOG, LOG10, LOGEST, LOGINV, LOGNORM, LOGNORMDIST, LOGNORMINV, LOOKUP, LOWER, MATCH, MAX, MAXA, MAXIFS, MEDIAN, MID, MIN, MINA, MINIFS, MINUTE, MIRR, MMULT, MOD, MODE, MODEMULT, MODESNGL, MONTH, MROUND, MULTINOMIAL, MUNIT, N, NA, NEGBINOM, NEGBINOMDIST, NETWORKDAYS, NETWORKDAYSINTL, NOMINAL, NORM, NORMDIST, NORMINV, NORMSDIST, NORMSINV, NOT, NOW, NPER, NPV, NUMBERVALUE, OCT2BIN, OCT2DEC, OCT2HEX, ODD, OR, PDURATION, PEARSON, PERCENTILE, PERCENTILEEXC, PERCENTILEINC, PERCENTRANK, PERCENTRANKEXC, PERCENTRANKINC, PERMUT, PERMUTATIONA, PHI, PI, PMT, POISSON, POISSONDIST, POWER, PPMT, PRICEDISC, PROB, PRODUCT, PROPER, PV, QUARTILE, QUARTILEEXC, QUARTILEINC, QUOTIENT, RADIANS, RAND, RANDBETWEEN, RANK, RANKAVG, RANKEQ, RATE, REPLACE, REPT, RIGHT, ROMAN, ROUND, ROUNDDOWN, ROUNDUP, ROW, ROWS, RRI, RSQ, SEARCH, SEC, SECH, SECOND, SERIESSUM, SIGN, SIN, SINH, SKEW, SKEWP, SLN, SLOPE, SMALL, SORT, SQRT, SQRTPI, STANDARDIZE, STDEV, STDEVA, STDEVP, STDEVPA, STDEVS, STEYX, SUBSTITUTE, SUBTOTAL, SUM, SUMIF, SUMIFS, SUMPRODUCT, SUMSQ, SUMX2MY2, SUMX2PY2, SUMXMY2, SWITCH, SYD, T, TAN, TANH, TBILLEQ, TBILLPRICE, TBILLYIELD, TDIST, TDISTRT, TEXT, TEXTJOIN, TIME, TIMEVALUE, TINV, TODAY, TRANSPOSE, TREND, TRIM, TRIMMEAN, TRUE, TRUNC, TTEST, TYPE, UNICHAR, UNICODE, UNIQUE, UPPER, VALUE, VAR, VARA, VARP, VARPA, VARS, VLOOKUP, WEEKDAY, WEEKNUM, WEIBULL, WEIBULLDIST, WORKDAY, WORKDAYINTL, XIRR, XNPV, XOR, YEAR, YEARFRAC, Z, ZTEST, utils };
|