patrobar
v1.6.1
Published
Patrobar (पात्रोबार): Nepali patro / Nepali calendar for JavaScript and TypeScript. Offline BS ↔ AD date converter, Nepal public holidays, working days, payroll and tithi. Short name for @nepali-calendar/nepali-calendar.
Maintainers
Readme
patrobar
Patrobar (पात्रोबार) is a free Nepali patro (Nepali calendar) package for JavaScript and TypeScript.
Website and documentation: https://patrobar.sarthaksharma.com.np
patrobar is the short, easy-to-remember name for @nepali-calendar/nepali-calendar, a Bikram Sambat (BS) calendar toolkit that is free to use, including commercially:
- offline AD ↔ BS conversion
- Government of Nepal public holidays
- working-day and payroll calendars
- calculated tithi
- Nepali localization
Both names install the same code at the same version.
npm install patrobarimport { NepaliCalendar } from "patrobar";
// CommonJS: const { NepaliCalendar } = require("patrobar");
const calendar = new NepaliCalendar(); // Saturday is the weekly holiday by default
calendar.convertToBS("2026-11-06").bs.iso; // "2083-07-20"
calendar.convertToAD({ year: 2083, month: 7, day: 21 }).ad.iso; // "2026-11-07"
const kartik = await calendar.getMonth(2083, 7);
const { workingDays } = await calendar.getWorkingDays({ year: 2083, month: 7 }); // 14Node.js 20 or newer. Also works in modern browsers and bundlers. ESM and CommonJS builds with TypeScript declarations. Zero runtime dependencies. The dataset is bundled, so conversion works offline.
Options are validated at runtime, shared data is immutable, and remote datasets are loaded over HTTPS with size limits and full validation.
Configuration, the API reference and data-accuracy notes are on the @nepali-calendar/nepali-calendar page.
Licence: free to use, including commercially, under the Nepali Calendar Free Use License (see LICENSE). Third-party licences are in THIRD_PARTY_NOTICES.md.
Contact: [email protected] · https://sarthaksharma.com.np/contact
