Making a solar calendar. Hijri Shamsi (Persian, solar) to Gregorian calendar

Hello, I found a template for a solar calendar, I wanted to know if anyone can make a solar calendar with this template?

Show us the template, so we can get the idea.

What you need to know:

solar Hijir calender

The simple way is to link to Online calculator: The Muslim calendar. The Gregorian calendar conversion where you calculate this

You should be able convert from a western calendar with Blocks using the information at the Solar Hijri calendar link. Be aware, the process is very complex. convert gregorian to solar hijri calendar algorithm - Google Search contains links that shows how you might be able to make a converter with Java.

I don't want to make a converter but I want to display a hijri solar calendar on the screen where users can select the day and get the output.

Nobody knows?

I'm not familiar with the hijri solar calendar...
Can you provide some examples? What is the output after selecting a day?

As far as I understand, the app does not have to display the current day, month and year of the hirji solar calendar, else you would need a conversion as @SteveJG suggested...

I also don't understand your table from here

you might want to elaborate...

Taifun

If the user clicks on the calendar button, instead of the lunar date and its days, it should show the year 1401 and the days of Hijri Shams.

For example, if today is 2022 and July 22, it returns this according to the pattern
1401 and Tir 31

Another example is that if it is the first of January, it should return on Dey 11, and if it is the end of January, it should return on Bahman 11.

January1 = 11 DEY
end January = 11 Bahman
........

i.e. you want to create a Hijri Shamsi Calendar to Gregorian Calendar converter. The user types the date in Hijri Shamsi Calendar and the code converts it to Gregorian Calendar, like this page:

Yes, I ask the user to tell him the date in solar and the system returns the date to Gregorian so I can do whatever I want with this date.

:cold_face: :sob: :sob: :cry:

Why are you bumping this topic?

Also see here:

https://groups.google.com/g/mitappinventortest/c/c0Z9eXtfif8/m/K-0K2B7yDuIJ

I think the best thing is to adapt a JavaScript code, here we have one with an MIT license, but I think it's a lunar calendar:
https://github.com/xsoh/moment-hijri/blob/master/README.md

To use a solar calendar you can see the source code of this web page, I have not seen any information about its license to use.

https://calcuworld.com/calendar-calculators/persian-calendar-converter/

It is forbidden to reproduce, in whole or in part, to copy or to distribute the Content without the express permission from the owner. In no case the access and navigation of the User means a renunciation, transmission, licence and total or partial cession of the Website owner rights. In addition, it is forbidden to modify, copy, reuse, exploit, reproduce, publicly communicate, transmit, use, process or distribute anyhow the entire or part of the Content and elements of the Website for public or commercial purposes if the owner did not granted express and written permission.

So, in accordance with the previous paragraph, the User is permitted to not only visualize but also to print, copy or download the Content and Website elements as long as these actions are for personal and private use.

1 Like

Therefore, according to the contents right paragraph, we can use part of the code of the indicated website.

The Julian calendar, was proposed by Julius Caesar 46 [BC]. Roma. Solar.
The Gregorian calendar is a modification and replacement of the Julian calendar. Salamanca 1582. Solar.
And this is Julian day. (JD) (Converter)[Today 23 July 2022 is JD: 2459784]

In countries of Africa and Asia, solar and lunar calendars are frequently used.

Let's see a code to convert date in Hijri Shamsi (solar)(Persian, currently used in Iran and Afghanistan) to Gregorian.

https://www.bsswebsite.me.uk/Daysanddates/persian-date.html

If we consult the source code of that page, we will see the JavaScript code and a note indicating the origin of the code.
This calculator comes from www.calcuworld.com/calendar-calculators by Summon Press S.L., Calle Hospital, 1 Puerta 3-46001 Valencia (Spain).

We are going to use part of the code JavaScript to convert a date from Hijri Shamsi to Julian and to Gregorian.