Annotation of freem/contrib/%T.m, revision 1.1
1.1 ! snw 1: %T ; A.Trocha; get current time 01/28/1999 01:39/GMT+1
! 2: ; $Source: /cvsroot-fuse/gump/FreeM/mlib/%T.m,v $
! 3: ; $Revision: 1.3 $ $Date: 2000/02/18 15:13:42 $
! 4: ; %TIM <hh>:<mm> (<hh>: 0-23)
! 5: ; %TIM1 <hh>:<mm> am|pm (<hh>: 1-12)
! 6: ; %TIM2 <hh>:<mm>:<ss> (<hh>: 0-23)
! 7: ;
! 8: N %TIM,%TIM1,%TIM2
! 9: D INT
! 10: W %TIM1
! 11: Q
! 12:
! 13: INT N time,hh,hh2,mm,ss
! 14: S time=$P($H,",",2)
! 15: S hh=time\3600
! 16: S mm=time-(hh*3600)\60
! 17: S ss=time-(hh*3600)-(mm*60)
! 18: S %TIM=hh_":"_(mm\10)_(mm#10) ; like MSM
! 19: S hh2=(hh-1)#12+1
! 20: S %TIM1=$J(hh2,2)_":"_(mm\10)_(mm#10)_" "_$S(hh\13:"PM",1:"AM") ; like MSM
! 21: S %TIM2=%TIM_":"_(ss\10)_(ss#10)
! 22: Q
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>