/** * D3 Time Polyfill - Lightweight time interval functions. * * This is a drop-in replacement for d3-time, implementing only the time interval * floor functions used in the Vega chart time axis label formatter: * timeSecond, timeMinute, timeHour, timeDay, timeWeek, timeMonth, timeYear. * * Each function floors a Date to the nearest interval boundary, which is used * to determine the appropriate label granularity for time-series chart axes. * * @see VD-5022 - [Zero Dependencies] remove d3 dependency */ /** * Floors a date to the nearest second boundary. * Used to detect sub-second (millisecond) granularity. * * @param {Date} date - Input date. * @returns {Date} A new Date floored to the nearest second. */ export declare function timeSecond(date: Date): Date; /** * Floors a date to the nearest minute boundary. * Used to detect sub-minute (second) granularity. * * @param {Date} date - Input date. * @returns {Date} A new Date floored to the nearest minute. */ export declare function timeMinute(date: Date): Date; /** * Floors a date to the nearest hour boundary. * Used to detect sub-hour (minute) granularity. * * @param {Date} date - Input date. * @returns {Date} A new Date floored to the nearest hour. */ export declare function timeHour(date: Date): Date; /** * Floors a date to the start of the day (midnight). * Used to detect sub-day (hour) granularity. * * @param {Date} date - Input date. * @returns {Date} A new Date floored to midnight. */ export declare function timeDay(date: Date): Date; /** * Floors a date to the start of the week (Sunday). * Used to distinguish day vs week label granularity. * * @param {Date} date - Input date. * @returns {Date} A new Date floored to the start of the week (Sunday at midnight). */ export declare function timeWeek(date: Date): Date; /** * Floors a date to the first of the month. * Used to detect sub-month granularity. * * @param {Date} date - Input date. * @returns {Date} A new Date floored to the 1st of the month at midnight. */ export declare function timeMonth(date: Date): Date; /** * Floors a date to January 1st of the year. * Used to detect sub-year (month) granularity. * * @param {Date} date - Input date. * @returns {Date} A new Date floored to January 1st at midnight. */ export declare function timeYear(date: Date): Date;