Print Page | Close Window

Conversion between Gregorian and Hijri calendars

Printed From: IslamiCity.org
Category: Culture & Community
Forum Name: Apps /Softwares
Forum Description: Application and Softwares
URL: https://www.islamicity.org/forum/forum_posts.asp?TID=42539
Printed Date: 16 February 2025 at 5:11am
Software Version: Web Wiz Forums 12.03 - http://www.webwizforums.com


Topic: Conversion between Gregorian and Hijri calendars
Posted By: dc2000
Subject: Conversion between Gregorian and Hijri calendars
Date Posted: 25 April 2018 at 5:21pm
Hello Everyone:


Let me start off by saying that I am a software developer. I grew up in the West and I don't know much about the subject of the Islamic calendar. On top of that I am not a Muslim. So I apologize in advance if I ask something obvious.

I've written a time tracking software that allows users to track their work time. For instance, on this day someone began work at this time, had a break at this time, then went home at this time. Then at the end of the month, the software will tabulate how many hours you worked so that your employer can pay you.

Additionally the software has an option to display public holidays for a specific country when people do not work (but optionally can be paid on some of those holidays.)

I should admit that I was totally ignorant to assume that everyone in the world was using the same Gregorian calendar. (You know, the one with January, February, etc. as months.) But then I started getting emails from my Muslim customers basically schooling me on my assumption being totally wrong. So now I admit my ignorance and am willing to learn and correct mistakes in my software.

You see, the issue for me is defining public holidays. Internally a computer uses Gregorian calendar to keep all the dates. So I'm trying to research the lunar calendar (currency https://en.wikipedia.org/wiki/Islamic_calendar" rel="nofollow - reading Wikipedia ) but I am struggling to understand how to write a conversion from the Gregorian calendar to Hijri (or Islamic lunar) calendar, and vice versa. My main problem is that it sounds like there's no way to know ahead of time the beginning of the Hijri month, since it is selected by the clerics at the beginning of each month during the ceremony of observing the crescent of the Moon. Is that correct?

Is so, how do you guys deal with this in your software?

I mean, there's no way of knowing how many days will be in the current month.

So to address this in my software, do you think, would it help if I added a switch (or controls) in the settings that read something like this:

"First sighting of the hilal" for the month of, "Shaban" for the year "1439" was on ---- and then the control that allows to select a Gregorian date.

Or is there some other way that it is done?

I'm just trying to make it more convenient for my Muslim users.


Thank you for your understanding of my ignorance!




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.03 - http://www.webwizforums.com
Copyright ©2001-2019 Web Wiz Ltd. - https://www.webwiz.net