Skip to main content

getMonth

Returns the full year of the current date.

  • import the method
import { getMonth } from "nodelpers";
  • params
date?: TDate;
asString: boolean;

TDate = number | string | Date;
  • usage
getMonth(); // current month
getMonth("2025-03-11"); // 3
getMonth("2025-03-11", true); // March