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