hd-utils
Version:
A handy utils for modern JS developers
9 lines (8 loc) • 350 B
TypeScript
/**
* @description will get the deference between 2 dates in months.
* @description Warning: value can be minus if the you passed dates in reverse.
*
* @example monthDifference("2022", "2023") // 12
* @example monthDifference("2023", "2022") // -12
*/
export default function monthDifference(first: string | Date, last: string | Date): number;