Introduction
NepDate is the Bikram Sambat calendar (BS, the official calendar of Nepal) as a family of libraries that behave the same in every language, and a few apps built on them.
Every library converts between BS and AD for BS 1901-01-01 to 2199-12-30 (AD 1844-04-11 to 2143-04-15), formats and parses Nepali dates in English and Nepali, does date arithmetic and fiscal years, and gives the same answer as every other port. The answers are checked against the same test vectors in each repository.
The libraries
Section titled “The libraries”Each language ships two packages with one version, now 0.1.0-beta.1, a public pre-release:
- The core: conversion, arithmetic, fiscal year, formatting and parsing. No dependencies and no almanac data.
- The patro (पात्रो, the Nepali almanac): tithi, public holidays and events for BS 2077 to 2084. It depends on the core, never the other way round.
The C# original, NepDate by Raju Prasai, is where the calendar data and the algorithm come from. It ships as one package with its own versions. The ports match it, and where they differ on purpose, they all differ the same way (Same answer everywhere).
Every port is also faster than every other Bikram Sambat library we could measure in its language (Performance).
The apps
Section titled “The apps”- MitiBar: a tray calendar for Windows, macOS and Linux with a floating date bar on Windows, built on the Rust library.
- NepDate for Android and iOS: a month view, holidays and home-screen widgets, in development.
Where things live
Section titled “Where things live”| What | Where |
|---|---|
| Calendar data, the spec and the test vectors | sanamhub/nepdate, the hub |
| Each language | its own repository, linked from its page here |
| A wrong date, holiday or tithi | the hub’s data error form |
| This site | site/ in the hub |
Patro data is informational, not an official calendar. NepDate is not affiliated with the Government of Nepal.