Examples Delphi

Title: JulianDate
Question: Convert JulianDateToDate DateToJulianDate ???
Answer:
////////////////////////////////////
Procedure JuliandateToDate(juliandate:Integer);
var day,month,year:integer;
Begin
Year := INT((4 * JulianDate - 1) / 1461);
Day := (4 * JulianDate - 1) - (1461 * Year);
Day := INT((Day + 4) / 4);
Month := INT((5 * Day - 3) / 153);
Day := 5 * Day - 3 - 153 * Month;
Day := INT((Day + 5) / 5);
IF Month Month := Month + 3;
ELSE
Begin
Month := Month - 9;
Year := Year + 1;
End;
End;
////////////////////////////////////
procedure DateToJulianDate(day,month,year:Integer);
var juliandate:Integer;
Begin
IF Month Month := Month + 9;
Year := Year - 1;
end
ELSE
begin
Month := Month - 3;
End;
JulianDate := INT((1461 * Year) / 4) + INT((153 * Month + 2) / 5) + Day;
End;
////////////////////////////////////