Telegram_2025-01-13T13

<< Click to Display Table of Contents >>

Navigation:  Telegram > 2025 > 01 > 13 >

Telegram_2025-01-13T13

Telegram link

 

2025-01-13T13:04:09

 

The IWBootstrap demos can be downloaded from here:

 

type: link https://downloads.atozed.com/intraweb/iwbootstrap/IWBootstrap_Demo_Redist.zip

 


 

Telegram link

 

2025-01-13T13:16:34

 

Regarding the date conversion, I'm not aware of any Delphi library that does that.

 


 

Telegram link

 

2025-01-13T13:17:18

 

I found this code with a quick search:

 

type: link https://delphidanlainnya.blogspot.com/2009/03/hijri-date-conversion-unit-delphi_23.html

 

Based on this, ChatGPT suggests this code to implement the HijriToGre() function

 


 

Telegram link

 

2025-01-13T13:17:24

 

function HijriToGre(HijriDate, HijriMonth, HijriYear: Integer): TDateTime;

 

var

 

jd, l, n, j: Integer;

 

a, b, c, d, e, m: Integer;

 

Day, Month, Year: Word;

 

begin

 

// Calculate the Julian Day from Hijri date

 

jd := (HijriYear - 1) * 10631 div 30 + (HijriMonth - 1) * 29.5 + HijriDate + 1948440 - 1;

 

// Convert Julian Day to Gregorian date

 

l := jd + 68569;

 

n := 4 * l div 146097;

 

l := l - (146097 * n + 3) div 4;

 

j := 4000 * (l + 1) div 1461001;

 

l := l - 1461 * j div 4 + 31;

 

m := 80 * l div 2447;

 

Day := l - 2447 * m div 80;

 

l := m div 11;

 

Month := m + 2 - 12 * l;

 

Year := 100 * (n - 49) + j + l;

 

// Return the TDateTime value

 

Result := EncodeDate(Year, Month, Day);

 

end;