mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-11 13:11:31 +01:00
* fixed juliantogregorian (mailinglist)
This commit is contained in:
parent
fc3fe6d723
commit
d9aa2e2e58
@ -539,7 +539,7 @@ Function FSStat(Path:Pathstr;Var Info:statfs):Boolean;
|
||||
Function FSStat(Fd: Longint;Var Info:statfs):Boolean;
|
||||
Function Fcntl(Fd:Text;Cmd:Integer):integer;
|
||||
Procedure Fcntl(Fd:Text;Cmd:Integer;Arg:Longint);
|
||||
Function Dup(oldfile:longint;var newfile:longint):Boolean;
|
||||
Function Dup(oldfile,newfile:longint):Boolean;
|
||||
Function Dup(var oldfile,newfile:text):Boolean;
|
||||
Function Dup(var oldfile,newfile:file):Boolean;
|
||||
Function Dup2(oldfile,newfile:longint):Boolean;
|
||||
@ -1101,7 +1101,7 @@ End;
|
||||
|
||||
Procedure JulianToGregorian(JulianDN:LongInt;Var Year,Month,Day:Word);
|
||||
Var
|
||||
YYear,XYear,Temp : LongInt;
|
||||
YYear,XYear,Temp,TempMonth : LongInt;
|
||||
Begin
|
||||
Temp:=((JulianDN-D2) shl 2)-1;
|
||||
JulianDN:=Temp Div D1;
|
||||
@ -1109,13 +1109,14 @@ Begin
|
||||
YYear:=(XYear Div D0);
|
||||
Temp:=((((XYear mod D0)+4) shr 2)*5)-3;
|
||||
Day:=((Temp Mod 153)+5) Div 5;
|
||||
Month:=Temp Div 153;
|
||||
If Month>=10 Then
|
||||
TempMonth:=Temp Div 153;
|
||||
If TempMonth>=10 Then
|
||||
Begin
|
||||
inc(YYear);
|
||||
dec(Month,12);
|
||||
dec(TempMonth,12);
|
||||
End;
|
||||
inc(Month,3);
|
||||
inc(TempMonth,3);
|
||||
Month := TempMonth;
|
||||
Year:=YYear+(JulianDN*100);
|
||||
end;
|
||||
|
||||
@ -1708,7 +1709,7 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
Function Dup(oldfile:longint;var newfile:longint):Boolean;
|
||||
Function Dup(oldfile,newfile:longint):Boolean;
|
||||
{
|
||||
Copies the filedescriptor oldfile to newfile
|
||||
}
|
||||
@ -3520,8 +3521,8 @@ End.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.30 1999-02-22 10:32:10 pierre
|
||||
* Dup second arg must be var arg !
|
||||
Revision 1.31 1999-02-22 11:47:42 peter
|
||||
* fixed juliantogregorian (mailinglist)
|
||||
|
||||
Revision 1.29 1999/02/02 21:19:54 michael
|
||||
Corrected wrong mode error in fdopen
|
||||
|
||||
Loading…
Reference in New Issue
Block a user