Calendar plugin

I don’t know if this is an idea or a simple question. Maybe an idea if the answer is no.

Is Gramps written in such a way that someone could write an addon that adds a calendar to the date editor?

Here someone is asking if there’s one for the Nepalese calendar: Reddit - Please wait for verification

@SNoiraud built an enhancement for 6.1

I’m not sure (even I don’t think) this enhancement cover my question (?)

The question is “is it possible to create/add a calendar (like French revolution calendar) using an addon in the plugins directory? Does Gramps allow these kinds of addons?”

I think this can be hacked.

In the python file gcalendar.py a number of calendars are defined, so I guess it is just a question of defining a Nepalese calendar in this file and then add a line in the date.py file to make the Nepalese calendar available in the Date editor.

I must admit that I have no idea of what a Nepalese calendar looks like, so it might require a lot more than e.g. the definition for gregorian and julian calendars.

Edit

Searched a little - it’s actually called Nepali Calendar
Today is 21st of Baishak year 2083 (May 4th, 2026)
A month can have up to 32 days.

So the definition in gcalendar.py might require a bit more that the Julian calendar.
The Hebrew calendar seems to have quite a lot of code in the gcalendar.py

Yes, but you only need to write two functions. One converts a year, month and day to a day number (sdn), and the other does the reverse.

I came across this project while searching for alternatives when reading another discussion about calendars, and it appears that this library — https://github.com/espinielli/pycalcal — which is based on the book Calendrical Calculations (Third Edition) by Nachum Dershowitz and Edward M. Reingold https://www.cs.tau.ac.il/~nachum/calendar-book/index.shtml also includes support for the French Revolutionary calendar.

What I cannot say is whether the license actually allows this library to be used inside a distributed Gramplet. That is something someone more familiar with software licensing would need to verify, since the book, the algorithms, and the library itself are all copyrighted.

There’s a python library for converting between Gregorian and the Bikram Sambat calendar of Nepal.

But evidently that calendar system had frequent modifications. So it doesn’t lend itself to an algorithmic conversion. Instead, it uses a lookup table system that only goes back to 1971 CE. Obviously, being limited to modern date conversion does not offer enough value to historical work.

pyBSDate 0.3.2

So far, the only converter I’ve found for historical data goes back to 1659 B.S. (Apparently, the calendar started around 1602 and another calendar was used before that.) And it is a website-based convertor form tool that is aggravatingly full of ads.

@PLegoux actually ask about the French Revolution Calendar

I think the Nepali Calendar just was an example…

Does that mean you’re not using uBlock Origin to blocks ads?

When exploring solutions, I choose to experience what the average user will see.

So I can mention that FamilySearch, Ancestry or DropBox requires signing up for an account. Or experience the pain to drive seeking options that do not have those barriers.

Similarly to when I ran beta testing for a commercial software testing. Instead of a high-power workstation, my daily use computer was a basic workstation… to see whether the product was viable for the mass market.

Ah, that explains it.