nhb-toolbox
Version:
A versatile collection of smart, efficient, and reusable utility functions, classes and types for everyday development needs.
23 lines (22 loc) • 1.06 kB
TypeScript
import type { $Chronos, SeasonOptions } from '../types';
declare module '../Chronos' {
interface Chronos {
/**
* @instance Returns the current season name based on optional season rules or presets.
* @param options Configuration with optional custom seasons or preset name.
* @returns The name of the season the current date falls under.
*/
season(options?: SeasonOptions): string;
/**
* @instance Returns the current season name based on optional season rules or presets.
*
* @remarks This method is an alias for {@link https://toolbox.nazmul-nhb.dev/docs/classes/Chronos/names#season season} method.
*
* @param options Configuration with optional custom seasons or preset name.
* @returns The name of the season the current date falls under.
*/
getSeasonName(options?: SeasonOptions): string;
}
}
/** * Plugin to inject `season`/`getSeasonName` method */
export declare const seasonPlugin: ($Chronos: $Chronos) => void;