Handling ‘Date Drift’: Gregorian vs. Hijri Conversion

When building the Misri Calendar Bot, I encountered a unique challenge. Hijri days start at Maghrib, not midnight. This breaks standard code logic. To handle this, I wrote a ‘Time-Shift’ function in JavaScript. This ensures the bot displays the correct Misri date based on whether the sun has set in the user’s requested city. Here’s the code snippet: Learn more about our tech stack.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *