@discomedia/utils 1.0.18 → 1.0.20

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.
@@ -116,6 +116,7 @@ export declare const disco: {
116
116
  getNYTimeZone: typeof mt.getNYTimeZone;
117
117
  getTradingDate: typeof mt.getTradingDate;
118
118
  getTradingStartAndEndDates: typeof mt.getTradingStartAndEndDates;
119
+ countTradingDays: typeof mt.countTradingDays;
119
120
  MARKET_TIMES: Types.MarketTimesConfig;
120
121
  };
121
122
  utils: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,IAAI,MAAM,cAAc,CAAC;AACrC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAErC,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AACpC,OAAO,KAAK,SAAS,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAK3C,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;kBA4Bd,CAAF;;;kBAoCmL,CAAC;;;kBAA4zC,CAAC;;;kBAAkwC,CAAC;;;kBAAisD,CAAC;gBAAkB,CAAC;iBAAmB,CAAC;iBAAmB,CAAC;gBAAkB,CAAC;;;;;;;;;;;;;;;;;;kBAjDl/I,CAAC;;;kBAiD4rS,CAAC;oBAAsB,CAAC;sBAAyB,CAAC;;;kBAAhxP,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,CAAC;wBAAmC,CAAC;iBAA4B,CAAC;iBAA2B,CAAC;gBAAkB,CAAC;;;;;eAA5/W,CAAC;;;iBAAiE,CAAC;;kBAAmC,CAAC;;;;;kBAA65Q,CAAC;oBAAsB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CADnxZ,CAAC"}
@@ -1,9 +1,8 @@
1
- import { Period, IntradayReporting, PeriodDates, MarketTimeParams, OutputFormat, MarketOpenCloseResult, MarketStatus, MarketTimesConfig } from './types/market-time-types';
2
- /**
3
- * Market configuration constants
4
- */
1
+ import { IntradayReporting, PeriodDates, MarketTimeParams, MarketOpenCloseResult, MarketStatus, MarketTimesConfig } from './types/market-time-types';
5
2
  export declare const MARKET_CONFIG: {
6
3
  readonly TIMEZONE: "America/New_York";
4
+ readonly UTC_OFFSET_STANDARD: -5;
5
+ readonly UTC_OFFSET_DST: -4;
7
6
  readonly TIMES: {
8
7
  readonly EXTENDED_START: {
9
8
  readonly hour: 4;
@@ -36,138 +35,47 @@ export declare const MARKET_CONFIG: {
36
35
  };
37
36
  };
38
37
  /**
39
- * Service for handling market calendar operations (holidays, early closes, market days)
40
- */
41
- export declare class MarketCalendar {
42
- private timezone;
43
- constructor(timezone?: string);
44
- /**
45
- * Check if a date is a weekend
46
- */
47
- isWeekend(date: Date): boolean;
48
- /**
49
- * Check if a date is a market holiday
50
- */
51
- isHoliday(date: Date): boolean;
52
- /**
53
- * Check if a date is an early close day
54
- */
55
- isEarlyCloseDay(date: Date): boolean;
56
- /**
57
- * Get the early close time for a date (in minutes from midnight)
58
- */
59
- getEarlyCloseTime(date: Date): number | null;
60
- /**
61
- * Check if a date is a market day (not weekend or holiday)
62
- */
63
- isMarketDay(date: Date): boolean;
64
- /**
65
- * Get the next market day from a given date
66
- */
67
- getNextMarketDay(date: Date): Date;
68
- /**
69
- * Get the previous market day from a given date
70
- */
71
- getPreviousMarketDay(date: Date): Date;
72
- }
73
- /**
74
- * Service for formatting time outputs
75
- */
76
- export declare class TimeFormatter {
77
- private timezone;
78
- constructor(timezone?: string);
79
- /**
80
- * Format a date based on the output format
81
- */
82
- formatDate(date: Date, outputFormat?: OutputFormat): string | number;
83
- /**
84
- * Get New York timezone offset
85
- */
86
- getNYTimeZone(date?: Date): '-04:00' | '-05:00';
87
- /**
88
- * Get trading date in YYYY-MM-DD format
89
- */
90
- getTradingDate(time: string | number | Date): string;
91
- }
92
- /**
93
- * Service for core market time calculations
94
- */
95
- export declare class MarketTimeCalculator {
96
- private calendar;
97
- private timezone;
98
- constructor(timezone?: string);
99
- /**
100
- * Get market open/close times for a date
101
- */
102
- getMarketTimes(date: Date): MarketOpenCloseResult;
103
- /**
104
- * Check if a time is within market hours based on intraday reporting mode
105
- */
106
- isWithinMarketHours(date: Date, intradayReporting?: IntradayReporting): boolean;
107
- /**
108
- * Get the last full trading date
109
- */
110
- getLastFullTradingDate(currentDate?: Date, extendedHours?: boolean): Date;
111
- /**
112
- * Get day boundaries based on intraday reporting mode
113
- */
114
- getDayBoundaries(date: Date, intradayReporting?: IntradayReporting): {
115
- start: Date;
116
- end: Date;
117
- };
118
- }
119
- /**
120
- * Service for calculating time periods
121
- */
122
- export declare class PeriodCalculator {
123
- private calendar;
124
- private timeCalculator;
125
- private formatter;
126
- constructor(timezone?: string);
127
- /**
128
- * Calculate the start date for a given period
129
- */
130
- calculatePeriodStartDate(endDate: Date, period: Period): Date;
131
- /**
132
- * Get period dates for market time calculations
133
- */
134
- getMarketTimePeriod(params: MarketTimeParams): PeriodDates;
135
- }
136
- /**
137
- * Service for determining market status
138
- */
139
- export declare class MarketStatusService {
140
- private calendar;
141
- private timeCalculator;
142
- private timezone;
143
- constructor(timezone?: string);
144
- /**
145
- * Get current market status
146
- */
147
- getMarketStatus(date?: Date): MarketStatus;
148
- }
149
- /**
150
- * Get market open/close times for a given date
38
+ * Returns market open/close times for a given date.
39
+ * @param options - { date?: Date }
40
+ * @returns MarketOpenCloseResult
151
41
  */
152
42
  export declare function getMarketOpenClose(options?: {
153
43
  date?: Date;
154
44
  }): MarketOpenCloseResult;
155
45
  /**
156
- * Get start and end dates for a given market time period
46
+ * Returns the start and end dates for a market time period as Date objects.
47
+ * @param params - MarketTimeParams
48
+ * @returns Object with start and end Date
157
49
  */
158
50
  export declare function getStartAndEndDates(params?: MarketTimeParams): {
159
51
  start: Date;
160
52
  end: Date;
161
53
  };
162
54
  /**
163
- * Get the last full trading date
55
+ * Returns the last full trading date as a Date object.
56
+ */
57
+ /**
58
+ * Returns the last full trading date as a Date object.
59
+ * @param currentDate - Date object (default: now)
60
+ * @returns Date object for last full trading date
61
+ */
62
+ export declare function getLastFullTradingDate(currentDate?: Date): Date;
63
+ /**
64
+ * Returns the last full trading date and formatted YYYYMMDD string.
65
+ */
66
+ /**
67
+ * Returns the last full trading date and formatted YYYY-MM-DD string.
68
+ * @param currentDate - Date object (default: now)
69
+ * @returns Object with date and YYYYMMDD string
164
70
  */
165
- export declare function getLastFullTradingDate(currentDate?: Date): {
71
+ export declare function getLastFullTradingDateInfo(currentDate?: Date): {
166
72
  date: Date;
167
73
  YYYYMMDD: string;
168
74
  };
169
75
  /**
170
- * Get the next market day
76
+ * Returns the next market day after the reference date.
77
+ * @param referenceDate - Date object (default: now)
78
+ * @returns Object with date, yyyymmdd string, and ISO string
171
79
  */
172
80
  export declare function getNextMarketDay({ referenceDate }?: {
173
81
  referenceDate?: Date;
@@ -177,35 +85,52 @@ export declare function getNextMarketDay({ referenceDate }?: {
177
85
  dateISOString: string;
178
86
  };
179
87
  /**
180
- * Get trading date in YYYY-MM-DD format
88
+ * Returns the trading date for a given time. Note: Just trims the date string; does not validate if the date is a market day.
89
+ * @param time - a string, number (unix timestamp), or Date object representing the time
90
+ * @returns the trading date as a string in YYYY-MM-DD format
91
+ */
92
+ /**
93
+ * Returns the trading date for a given time in YYYY-MM-DD format (NY time).
94
+ * @param time - string, number, or Date
95
+ * @returns trading date string
181
96
  */
182
97
  export declare function getTradingDate(time: string | number | Date): string;
183
98
  /**
184
- * Get New York timezone offset
99
+ * Returns the NY timezone offset string for a given date.
100
+ * @param date - Date object (default: now)
101
+ * @returns '-04:00' for EDT, '-05:00' for EST
185
102
  */
186
103
  export declare function getNYTimeZone(date?: Date): '-04:00' | '-05:00';
187
104
  /**
188
- * Get current market status
105
+ * Returns the current market status for a given date.
106
+ * @param options - { date?: Date }
107
+ * @returns MarketStatus object
189
108
  */
190
109
  export declare function getMarketStatus(options?: {
191
110
  date?: Date;
192
111
  }): MarketStatus;
193
112
  /**
194
- * Check if a date is a market day
113
+ * Checks if a date is a market day.
114
+ * @param date - Date object
115
+ * @returns true if market day, false otherwise
195
116
  */
196
117
  export declare function isMarketDay(date: Date): boolean;
197
118
  /**
198
- * Check if a date is within market hours
119
+ * Checks if a date/time is within market hours, extended hours, or continuous.
120
+ * @param date - Date object
121
+ * @param intradayReporting - 'market_hours', 'extended_hours', or 'continuous'
122
+ * @returns true if within hours, false otherwise
199
123
  */
200
124
  export declare function isWithinMarketHours(date: Date, intradayReporting?: IntradayReporting): boolean;
201
125
  /**
202
- * Function to find complete trading date periods, starting at the beginning of one trading date and ending at the last.
203
- * By default, it gets the last trading date, returning the beginning and end. But we can also a) define the end date
204
- * on which to look (which is the end market date, e.g. for 8 july 2025 we'd return an end of 16:00 NY time on that date),
205
- * and to go back x days before, e.g. 7 would just subtract raw 7 days, giving us 4-5 trading days (depending on holidays).
206
- * @param options.endDate - The end date to use, defaults to today
207
- * @param options.days - The number of days to go back, defaults to 1
208
- * @returns The start and end dates with proper market open/close times
126
+ * Returns full trading days from market open to market close.
127
+ * endDate is always the most recent market close (previous day's close if before open, today's close if after open).
128
+ * days: 1 or not specified = that day's open; 2 = previous market day's open, etc.
129
+ */
130
+ /**
131
+ * Returns full trading days from market open to market close.
132
+ * @param options - { endDate?: Date, days?: number }
133
+ * @returns Object with startDate and endDate
209
134
  */
210
135
  export declare function getTradingStartAndEndDates(options?: {
211
136
  endDate?: Date;
@@ -215,7 +140,10 @@ export declare function getTradingStartAndEndDates(options?: {
215
140
  endDate: Date;
216
141
  };
217
142
  /**
218
- * Create a market time utility instance with custom timezone
143
+ * Creates a MarketTime utility instance with helper methods.
144
+ * @param timezone - Optional timezone string
145
+ * @param intradayReporting - Optional intraday reporting mode
146
+ * @returns Utility object with market time methods
219
147
  */
220
148
  export declare function createMarketTimeUtil(timezone?: string, intradayReporting?: IntradayReporting): {
221
149
  isMarketDay: (date: Date) => boolean;
@@ -230,12 +158,10 @@ export declare function createMarketTimeUtil(timezone?: string, intradayReportin
230
158
  isEarlyCloseDay: (date: Date) => boolean;
231
159
  getEarlyCloseTime: (date: Date) => number | null;
232
160
  };
161
+ /**
162
+ * Backward compatibility class for MarketTime utilities.
163
+ */
233
164
  export declare class MarketTimeUtil {
234
- private calculator;
235
- private calendar;
236
- private formatter;
237
- private periodCalc;
238
- private statusService;
239
165
  private intradayReporting;
240
166
  constructor(timezone?: string, intradayReporting?: IntradayReporting);
241
167
  isMarketDay(date: Date): boolean;
@@ -249,5 +175,37 @@ export declare class MarketTimeUtil {
249
175
  isEarlyCloseDay(date: Date): boolean;
250
176
  getEarlyCloseTime(date: Date): number | null;
251
177
  }
178
+ /**
179
+ * Counts trading time between two dates (passed as standard Date objects), excluding weekends and holidays, and closed market hours, using other functions in this library.
180
+ *
181
+ * This function calculates the actual trading time between two dates by:
182
+ * 1. Iterating through each calendar day between startDate and endDate (inclusive)
183
+ * 2. For each day that is a market day (not weekend/holiday), getting market open/close times
184
+ * 3. Calculating the overlap between the time range and market hours for that day
185
+ * 4. Summing up all the trading minutes across all days
186
+ *
187
+ * The function automatically handles:
188
+ * - Weekends (Saturday/Sunday) - skipped entirely
189
+ * - Market holidays - skipped entirely
190
+ * - Early close days (e.g. day before holidays) - uses early close time
191
+ * - Times outside market hours - only counts time within 9:30am-4pm ET (or early close)
192
+ *
193
+ * Examples:
194
+ * - 12pm to 3:30pm same day = 3.5 hours = 210 minutes = 0.54 days
195
+ * - 9:30am to 4pm same day = 6.5 hours = 390 minutes = 1 day
196
+ * - Friday 2pm to Monday 2pm = 6.5 hours (Friday 2pm-4pm + Monday 9:30am-2pm)
197
+ *
198
+ * @param startDate - Start date/time
199
+ * @param endDate - End date/time (default: now)
200
+ * @returns Object containing:
201
+ * - days: Trading time as fraction of full trading days (6.5 hours = 1 day)
202
+ * - hours: Trading time in hours
203
+ * - minutes: Trading time in minutes
204
+ */
205
+ export declare function countTradingDays(startDate: Date, endDate?: Date): {
206
+ days: number;
207
+ hours: number;
208
+ minutes: number;
209
+ };
252
210
  export declare const MARKET_TIMES: MarketTimesConfig;
253
211
  //# sourceMappingURL=market-time.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"market-time.d.ts","sourceRoot":"","sources":["../../src/market-time.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,MAAM,EACN,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,qBAAqB,EACrB,YAAY,EACZ,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AAQnC;;GAEG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWhB,CAAC;AAGX;;GAEG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAS;gBAEb,QAAQ,GAAE,MAA+B;IAIrD;;OAEG;IACH,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO;IAK9B;;OAEG;IACH,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO;IAU9B;;OAEG;IACH,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO;IAOpC;;OAEG;IACH,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI;IAY5C;;OAEG;IACH,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO;IAIhC;;OAEG;IACH,gBAAgB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;IAQlC;;OAEG;IACH,oBAAoB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI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kB,CAAC,OAAO,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,IAAI,CAAA;KAAE,GAAG,qBAAqB;IAGpE,mBAAmB,CAAC,MAAM,EAAE,gBAAgB,GAAG,WAAW;IAG1D,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO;IAGpC,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI;CAG7C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,IAAI,EAAE,OAAO,GAAE,IAAiB,GAAG;IAC7E,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB,CA0DA;AAGD,eAAO,MAAM,YAAY,EAAE,iBA0B1B,CAAC"}
@@ -1,2 +1,2 @@
1
- import 'dotenv/config';
1
+ export {};
2
2
  //# sourceMappingURL=test.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../src/test.ts"],"names":[],"mappings":"AAEA,OAAO,eAAe,CAAC"}
1
+ {"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../src/test.ts"],"names":[],"mappings":""}
@@ -116,6 +116,7 @@ export declare const disco: {
116
116
  getNYTimeZone: typeof mt.getNYTimeZone;
117
117
  getTradingDate: typeof mt.getTradingDate;
118
118
  getTradingStartAndEndDates: typeof mt.getTradingStartAndEndDates;
119
+ countTradingDays: typeof mt.countTradingDays;
119
120
  MARKET_TIMES: Types.MarketTimesConfig;
120
121
  };
121
122
  utils: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK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