> DateEnsure 1.28 4 Ensure load/exec date and attribute date match  v1.00 (, v1.01 24-May-98 Ignores if no date set 27 v1.10 23-Jun-98 Reads update date from fileserver mdate, sets cdate=mdate ; v1.28 18-Jul-19 Updated NetFS functions for ARM CoPro : * ctrl% 31,name% 79:X%=ctrl%:Y%=X%256 : $15"Load&Save date"15"FS date" fs%=fs:scan  : scan: idx%,type%,f$ :f$=gbpb8(idx%):idx%=X%!9 4f$<>"":file:type%=2:"Dir "+f$:scan:"Dir ^" f$="": : ?file:f$="@."+f$:X%!14=0:X%!18=0:X%!22=0:type%=file(f$,5) Dld%=X%!2:ex%=X%!6:ln%=X%!10:at%=X%!14:cdate%=X%!15:mdate%=cdate% "]fs%=5:NetFS_Op(18,64+f$)=0:X%!15=X%!10:X%!17=X%!12:X%!20=X%!5:X%!22=X%!7:mdate%=X%!15 ,4f_date(cdate%):Cdy%=day%:Cmn%=month%:Cyr%=year% 64f_date(mdate%):Sdy%=day%:Smn%=month%:Syr%=year% @4f_time(X%!17):Sh%=hour%:Sm%=minute%:Ss%=second% J/!X%=ex%:X%!4=ld%:Date_ToOrd(X%):Lc%=centi% TFLdy%=day%:Lmn%=month%:Lyr%=year%:Lh%=hour%:Lm%=minute%:Ls%=second% ^?f$,3);(13-f$);d(Ldy%,2)"/"d(Lmn%,2)"/"d(Lyr%,4);" "; h;d(Lh%,2)":"d(Lm%,2)":"d(Ls%,2)"."d(Lc%,2);" "; r)d(Sdy%,2)"/"d(Smn%,2)"/";Syr%;" "; |/d(Sh%,2)":"d(Sm%,2)":"d(Ss%,2);23,8); DCdy%+32*Cmn%+32*12*Cyr%>Sdy%+32*Smn%+32*12*Syr%:ModifyToCreate ;(ld%&FFFF8000)=&FFFF0000:: : Loads to I/O RAM >Lyr%<1981:ShortToLong: : Long date pre-AE CSdy%+32*Smn%+32*12*Syr%Ldy%+32*Lmn%+32*12*Lyr%:LongToShort: CLs%+Lm%+Lh%+Lc%=0 :ShortToLong: CSs%+60*Sm%+60*60*Sh%Ls%+60*Lm%+60*60*Lh% :LongToShort: : : %ModifyToCreate:"MOD";8;8;8; 3X%?14=at%:X%!15=mdate%:A%=file(f$,4):fs%<>5: +X%!8=mdate%:A%=NetFS_OpN(19,5,10,f$): : 'ShortToLong:type%=2:ld%=-1:ex%=0 9(ld%&FFF00000)<>&FFF00000:: : No filetype &(ld%&FFFF8000)=&FFFF0000:(ex%&FFFF)>=(ld%&FFFF):(ex%&FFFF)<(ld%&FFFF)+ln%:: : Loads to I/O RAM 0<(ld%&FFFFFF00)=&FFFFDD00:: : Master utility :8((ld%+&1000)&FFFFC000)=&FFFF4000:: : Screendump D5(ld%&FFFFF000)=&FFFF0000:(ex%&FFF00000)=0:: N6Smn%=0 Sdy%=0:: : No date X<"<--";:Date_FromOrd(X%+6,Sdy%,Smn%,Syr%,Sh%,Sm%,Ss%,0) b0X%!2=ld%:X%?2=X%?10:X%!14=at%:A%=file(f$,1) l: v: LongToShort:"-->"; (X%?14=at%:A%=file(f$,4):fs%<>5:: BX%!8=X%!20:X%!10=X%!22 : Creation date&time :X%!13=f_date(Ldy%,Lmn%,Lyr%) : Update date :X%!15=f_time(Lh%,Lm%,Ls%) : Update time "A%=NetFS_OpN(19,64,18,f$):: : #ݤd(A%,N%)="000000000"+A%,N%) : Bݤfile(f$,A%):$name%=f$:?X%=name%:X%?1=name%256:=(&FFDD)&FF Eݤgbpb8(ptr%):X%!1=name%:X%!5=1:X%!9=ptr%:A%=8:&FFD1:X%!5=1:="" 7A%=name%+1:A%!(A%?-1)=&D20:A%?($A%," ")-1)=13:=$A%  ݤfs:A%,Y%,E%:=(&FFDA)&FF :  ;Date_FromOrd(mem%,d%,m%,y%,hr%,mn%,sc%,cs%):y%=y%400 qd%=y%*365.25+m%*30+d%+"120112234455",m%,1)+((y%4)=0)-((y%-1)100)-(m%>2((y%4)=0(y%100)<>0y%=0))+36493  d%>146066:d%=d%-146097 *=d%=d%*&41EB:mem%!1=d%+d%:d%=((hr%*60+mn%)*60+sc%)*100+cs% 4#?mem%=d%:mem%!1=mem%!1+d%256: >: H$Date_ToOrd(mem%): A%,B%,C%,D% R@year%=0:month%=0:day%=0:hour%=0:minute%=0:second%=0:centi%=0 \-mem%!1<0:: Problems with negatives ATM fFD%=mem%!1&83D6+2447065:C%=mem%?0+256*(mem%!1&83D6):centi%=C%100 p>C%=C%100:second%=C%60:C%=C%60:minute%=C%60:hour%=C%60 z8B%=((D%*4+3)146097-4)+3:C%=B%14614*5+2:D%=D%*4+3 .A%=C%153+2:day%=C%1535+1:month%=A%12+1 *year%=D%146097*100+B%1461+A%12-4800  : Dݤf_date(d%,m%,y%):y%=y%-1981:=d%+m%*256+(y%15)*4096+(y%16)*32 *ݤf_time(h%,m%,s%):=h%+m%*256+s%*65536 : 0f_date(d%):day%=d%31:month%=(d%&F00)256 +year%=(d%&F000)4096+(d%&E0)/2+1981: 4f_time(t%):hour%=t%255:minute%=(t%&FF00)256  second%=(t%&FF0000)65536: : +ݤNetFS_Op(A%,A$)=NetFS_OpN(A%,0,7,A$)  ݤNetFS_OpN(A%,T%,O%,A$):N% Q>&FFFF:X%?4=T%:$(X%+O%-3)=A$:ș&60048,A%,X%+4,O%+A$,120N%:N%=0:X%?3=0:=0 ;>&FFFF:N%>&FFFF:X%?3=?N%:ș&2002B,N%+4$(X%+4):=X%?3 $G!X%=0:X%?1=O%+1+A$:X%!3=A%:X%?7=T%:$(X%+O%)=A$:A%=&14:&FFF1:=X%?3