ts-time-utils
Version:
A comprehensive TypeScript utility library for time, dates, durations, and calendar operations with full tree-shaking support
21 lines • 3.69 kB
TypeScript
/**
* @fileoverview Main entry point for ts-time-utils library
* Re-exports all functions from individual modules for convenience
*/
export { formatDuration, timeAgo, formatTime, parseDuration } from './format.js';
export { differenceInUnits, addTime, subtractTime, startOf, endOf, isBetween, businessDaysBetween } from './calculate.js';
export { isValidDate, isLeapYear, isPast, isFuture, isToday, isYesterday, isTomorrow, isSameDay, isWeekend, isWeekday, isValidTimeString, isValidISOString } from './validate.js';
export { calculateAge, getAgeInUnits, getLifeStage, getNextBirthday, getDaysUntilBirthday, isBirthday } from './age.js';
export { getWeekNumber, getWeekOfMonth, getQuarter, getDayOfYear, getWeeksInYear, getDaysInMonth, getDaysInYear, getEaster, getMonthsInYear, getDaysInMonthArray, getWeekdaysInMonth, getFirstDayOfMonth, getLastDayOfMonth, getFirstDayOfYear, getLastDayOfYear } from './calendar.js';
export { parseDate, parseRelativeDate, parseTimeAgo, parseCustomFormat, parseManyFormats } from './parse.js';
export { sleep, timeout, debounce, throttle, retry, createStopwatch, measureTime, measureAsync, benchmark, Stopwatch } from './performance.js';
export { createInterval, isValidInterval, intervalDuration, intervalContains, intervalsOverlap, intervalIntersection, mergeIntervals, subtractInterval, splitIntervalByDay, totalIntervalCoverage, normalizeIntervals } from './interval.js';
export { getTimezoneOffset, formatInTimeZone, getZonedTime, convertDateToZone, isValidTimeZone, COMMON_TIMEZONES, getLocalOffset, compareZoneOffsets, reinterpretAsZone } from './timezone.js';
export { DEFAULT_WORKING_HOURS, isWorkingDay, isWorkingTime, nextWorkingTime, workingTimeBetween, addWorkingHours } from './workingHours.js';
export { today, yesterday, tomorrow, lastNDays, nextNDays, thisWeek, lastWeek, nextWeek, thisMonth, lastMonth, nextMonth, thisYear, lastYear, nextYear, rollingWindowDays, quarterRange, lastQuarter, nextQuarter, RANGE_PRESETS } from './rangePresets.js';
export { Duration, createDuration, isValidDuration, parseDurationString, formatDurationString, maxDuration, minDuration, sumDurations, averageDuration } from './duration.js';
export { serializeDate, deserializeDate, createDateReviver, createDateReplacer, parseISOString, toEpochTimestamp, fromEpochTimestamp, createEpochTimestamp, toDateObject, fromDateObject, isValidISODateString, isValidEpochTimestamp, cloneDate, datesEqual, now, parseJSONWithDates, stringifyWithDates } from './serialize.js';
export { registerLocale, getLocaleConfig, getSupportedLocales, formatRelativeTime, formatDateLocale, formatTimeLocale, formatDateTimeLocale, getMonthNames, getDayNames, getFirstDayOfWeek, isLocaleSupported, getBestMatchingLocale, detectLocale, convertRelativeTime, detectLocaleFromRelativeTime, convertFormatPattern, convertFormattedDate, convertRelativeTimeArray, compareLocaleFormats } from './locale.js';
export { MILLISECONDS_PER_SECOND, MILLISECONDS_PER_MINUTE, MILLISECONDS_PER_HOUR, MILLISECONDS_PER_DAY, MILLISECONDS_PER_WEEK, MILLISECONDS_PER_MONTH, MILLISECONDS_PER_YEAR, SECONDS_PER_MINUTE, SECONDS_PER_HOUR, SECONDS_PER_DAY, SECONDS_PER_WEEK, type TimeUnit, type FormatOptions } from './constants.js';
export type { DateInput, DateRange, ParseOptions, WorkingHoursConfig, AgeResult, ZonedTime, Interval, BenchmarkResult, RecurrencePattern, LocaleFormatOptions, BusinessConfig, DateValidator, DateTransformer, TimeUtilsError, ParseError, ValidationError, DurationUnit, DurationInput, DurationComparison, SerializationOptions, DateObject, EpochTimestamp, SupportedLocale, LocaleConfig, RelativeTimeOptions, RelativeTimeUnit } from './types.js';
//# sourceMappingURL=index.d.ts.map