monthDelta function

int monthDelta(
  1. NepaliDateTime startDate,
  2. NepaliDateTime endDate
)

Compare two NepaliDateTime objects to see if they are in the same year. startDate is the first NepaliDateTime object to compare. endDate is the second NepaliDateTime object to compare. Returns true if the two dates are in the same year, false otherwise.

Implementation

int monthDelta(NepaliDateTime startDate, NepaliDateTime endDate) {
  return (endDate.year - startDate.year) * 12 + endDate.month - startDate.month;
}