API Specification 0.0.1

Here are the API spec. Just started, therefore sure there will be changes. But whatever.
Returns plaintext, JSON encoded data, and also embedable Javascript on page. Protocol REST, thought only GET is implemented for now.

API Description

https://www.habibur.com/hijri/api01/date/

Returns today's Hijri date.

15-Shaban-1442

Convert for some other date? Send the date as parameter like this

https://www.habibur.com/hijri/api01/date/?date=2021-01-01

Returns

17-Jumada al-awwal-1442

Formats

For JSON, send format=json

https://www.habibur.com/hijri/api01/date/?format=json
{"hijri":"16-Shaban-1442"}

For raw date, send raw=yes

https://www.habibur.com/hijri/api01/date/?raw=yes
1442-08-16

Using on your page

To use it on your server side php page, you can easily call like this

print file_get_contents("https://www.habibur.com/hijri/api01/date/");
// the above code will print the hijri date.

To embed as Javascript snippet send format=js

https://www.habibur.com/hijri/api01/date/?format=js

Copy and paste this code into your static HTML page.

Hijri Date Today :
<span>
<script src='https://www.habibur.com/hijri/api01/date/?format=js'></script>
</span>

You can further style the p/span to change font size color.

Usage Persmission


Use for anything you like, be it commercial or non-commercial use, as long as my server doesn't boggle down due to your frequent calls. I have no idea where the limit is.
A few thousands calls per day might be ok.
I shall check server load and if it rises significantly than might inform you back on a solution. Cache the result to reduce calls if needed.

Credits, link back


Not required. But you can provide if you like so.