UNPKG

studiocms

Version:

Astro Native CMS for AstroDB. Built from the ground up by the Astro community.

18 lines (17 loc) 786 B
export declare const allowedIdentifiers: string[]; /** * Checks if a given date is within the last 30 days from the current date. * * @param date - The date to check. * @returns True if the date is within the last 30 days, otherwise false. */ export declare function withinLast30Days(date: Date): boolean; /** * Sorts two dates in ascending or descending order. * * @param a - The first date to compare. Can be null. * @param b - The second date to compare. Can be null. * @param desc - If true, sorts in descending order. Defaults to ascending order. * @returns A negative number if `a` is less than `b`, zero if they are equal, or a positive number if `a` is greater than `b`. */ export declare function sortByDate(a: Date | null, b: Date | null, desc?: boolean): number;