diff --git a/docs/modules/quoteSummary.md b/docs/modules/quoteSummary.md index eae2283e..a1eaad7e 100644 --- a/docs/modules/quoteSummary.md +++ b/docs/modules/quoteSummary.md @@ -398,9 +398,9 @@ await yahooFinance.quoteSummary('PLTR', { modules: [ "defaultKeyStatistics" ] }) "floatShares": 1513962964, "sharesOutstanding": 1805229952, "sharesShort": 58395451, - "sharesShortPriorMonth": 68132010, - "sharesShortPreviousMonthDate": 1625011200, - "dateShortInterest": 1627603200, + "sharesShortPriorMonth": new Date("1972-02-28T13:33:30.000Z"), + "sharesShortPreviousMonthDate": new Date("2021-06-30T00:00:00.000Z"), + "dateShortInterest": new Date("2021-07-30T00:00:00.000Z"), "sharesPercentSharesOut": 0.0311, "heldPercentInsiders": 0.12776, "heldPercentInstitutions": 0.25067, @@ -412,9 +412,9 @@ await yahooFinance.quoteSummary('PLTR', { modules: [ "defaultKeyStatistics" ] }) "priceToBook": 23.314608, "fundFamily": null, "legalType": null, - "lastFiscalYearEnd": 1609372800, - "nextFiscalYearEnd": 1672444800, - "mostRecentQuarter": 1625011200, + "lastFiscalYearEnd": new Date("2020-12-31T00:00:00.000Z"), + "nextFiscalYearEnd": new Date("2022-12-31T00:00:00.000Z"), + "mostRecentQuarter": new Date("2021-06-30T00:00:00.000Z"), "netIncomeToCommon": -1263715968, "trailingEps": -0.79, "pegRatio": 3.58, @@ -485,13 +485,13 @@ await yahooFinance.quoteSummary('MSFT', { modules: [ "earningsHistory" ] }); earningsHistory: { history: [ { - maxAge: 1, - epsActual: 1.4, - epsEstimate: 1.26, - epsDifference: 0.14, - surprisePercent: 0.111, - quarter: 1585612800, - period: '-4q' // "-3q", "-2q", "-1q" + "maxAge": 1, + "epsActual": 10.3, + "epsEstimate": 1.46, + "epsDifference": 8.84, + "surprisePercent": 6.055, + "quarter": new Date("2020-06-30T00:00:00.000Z"), + "period": "-4q" // "-3q", "-2q", "-1q" }, /* ... */ ], @@ -880,7 +880,7 @@ await yahooFinance.quoteSummary('PLTR', { modules: [ "insiderHolders" ] }); "transactionDescription": "Sale", "latestTransDate": new Date("2021-07-23T00:00:00.000Z"), "positionDirect": 6432260, - "positionDirectDate": 1626998400 + "positionDirectDate": new Date("2021-07-23T00:00:00.000Z") }, /* ... */ ], diff --git a/schema.json b/schema.json index 65b7ccb3..7459bcd1 100644 --- a/schema.json +++ b/schema.json @@ -3973,13 +3973,13 @@ "yahooFinanceType": "number" }, "sharesShortPriorMonth": { - "yahooFinanceType": "number" + "yahooFinanceType": "date" }, "sharesShortPreviousMonthDate": { - "yahooFinanceType": "number" + "yahooFinanceType": "date" }, "dateShortInterest": { - "yahooFinanceType": "number" + "yahooFinanceType": "date" }, "sharesPercentSharesOut": { "yahooFinanceType": "number" @@ -4027,13 +4027,13 @@ ] }, "lastFiscalYearEnd": { - "yahooFinanceType": "number" + "yahooFinanceType": "date" }, "nextFiscalYearEnd": { - "yahooFinanceType": "number" + "yahooFinanceType": "date" }, "mostRecentQuarter": { - "yahooFinanceType": "number" + "yahooFinanceType": "date" }, "earningsQuarterlyGrowth": { "yahooFinanceType": "number" @@ -4075,7 +4075,7 @@ "yahooFinanceType": "number" }, "lastDividendDate": { - "yahooFinanceType": "number" + "yahooFinanceType": "date" }, "ytdReturn": { "yahooFinanceType": "number" @@ -4298,7 +4298,14 @@ "yahooFinanceType": "number|null" }, "quarter": { - "yahooFinanceType": "number|null" + "anyOf": [ + { + "yahooFinanceType": "date" + }, + { + "type": "null" + } + ] }, "period": { "type": "string" @@ -5341,13 +5348,13 @@ "yahooFinanceType": "number" }, "positionDirectDate": { - "yahooFinanceType": "number" + "yahooFinanceType": "date" }, "positionIndirect": { "yahooFinanceType": "number" }, "positionIndirectDate": { - "yahooFinanceType": "number" + "yahooFinanceType": "date" }, "positionSummaryDate": { "yahooFinanceType": "date" diff --git a/src/modules/quoteSummary-iface.ts b/src/modules/quoteSummary-iface.ts index 424429ae..abf9e9c8 100644 --- a/src/modules/quoteSummary-iface.ts +++ b/src/modules/quoteSummary-iface.ts @@ -184,9 +184,9 @@ export interface DefaultKeyStatistics { floatShares?: number; sharesOutstanding?: number; sharesShort?: number; - sharesShortPriorMonth?: number; - sharesShortPreviousMonthDate?: number; - dateShortInterest?: number; + sharesShortPriorMonth?: Date; + sharesShortPreviousMonthDate?: Date; + dateShortInterest?: Date; sharesPercentSharesOut?: number; heldPercentInsiders?: number; heldPercentInstitutions?: number; @@ -199,9 +199,9 @@ export interface DefaultKeyStatistics { priceToBook?: number; fundFamily: null | string; legalType: null | string; - lastFiscalYearEnd?: number; - nextFiscalYearEnd?: number; - mostRecentQuarter?: number; + lastFiscalYearEnd?: Date; + nextFiscalYearEnd?: Date; + mostRecentQuarter?: Date; earningsQuarterlyGrowth?: number; netIncomeToCommon?: number; trailingEps?: number; @@ -214,7 +214,7 @@ export interface DefaultKeyStatistics { "52WeekChange"?: number; SandP52WeekChange?: number; lastDividendValue?: number; - lastDividendDate?: number; + lastDividendDate?: Date; ytdReturn?: number; beta3Year?: number; totalAssets?: number; @@ -278,7 +278,7 @@ export interface EarningsHistoryHistory { epsEstimate: number | null; epsDifference: number | null; surprisePercent: number | null; - quarter: number | null; + quarter: Date | null; period: string; } @@ -566,9 +566,9 @@ export interface Holder { transactionDescription: string; latestTransDate: Date; positionDirect?: number; - positionDirectDate?: number; + positionDirectDate?: Date; positionIndirect?: number; - positionIndirectDate?: number; + positionIndirectDate?: Date; positionSummaryDate?: Date; }