Nepali DateNepali DateBikram Sambat Date Engine
Fiscal Year & Quarters

date.getCurrentFiscalYearQuarterDates()

Method to retrieve exact start and end boundary dates for the active fiscal quarter.

The getCurrentFiscalYearQuarterDates method computes the exact starting date and ending date for the fiscal quarter containing the current date instance. It returns an object containing boundary dates as new NepaliDate objects, which is helpful for quarterly financial reporting, audit periods, and tax filing windows.


Import

import { NepaliDate } from "nepali-date-library";
const { NepaliDate } = require("nepali-date-library");

Signature

getCurrentFiscalYearQuarterDates(): { start: NepaliDate; end: NepaliDate };

Parameters

  • None.

Return Value

  • Type: { start: NepaliDate; end: NepaliDate }
  • Structure:
    • start: NepaliDate instance pointing to the first day of the quarter at 00:00:00.000.
    • end: NepaliDate instance pointing to the final day of the quarter at 23:59:59.999.

Examples

Getting Current Quarter Boundaries

import { NepaliDate } from "nepali-date-library";

// Assuming today is 2081 Kartik 15 (Q2):
const today = new NepaliDate();
const { start, end } = today.getCurrentFiscalYearQuarterDates();

console.log(start.format("YYYY-MM-DD")); // "2081-07-01" (1 Kartik)
console.log(end.format("YYYY-MM-DD"));   // "2081-09-30" (Last day of Poush)

Database Query Boundary Filter

import { NepaliDate } from "nepali-date-library";

function getActiveQuarterFilter() {
  const now = new NepaliDate();
  const { start, end } = now.getCurrentFiscalYearQuarterDates();

  return {
    startGregorian: start.getEnglishDate(),
    endGregorian: end.getEnglishDate(),
    quarterIndex: now.getCurrentFiscalYearQuarter(),
  };
}

Advertisement

On this page