File:
[Coherent Logic Development] /
freem /
contrib /
%T.m
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs
Sun Jan 19 02:04:04 2025 UTC (2 months, 2 weeks ago) by
snw
Branches:
MAIN,
CoherentLogicDevelopment
CVS tags:
v0-63-1-rc1,
v0-63-0-rc1,
v0-63-0,
v0-62-3,
v0-62-2,
v0-62-1,
v0-62-0,
start,
HEAD
FreeM
%T ; A.Trocha; get current time 01/28/1999 01:39/GMT+1
; $Source: /home/cvsroot/freem/contrib/%T.m,v $
; $Revision: 1.1.1.1 $ $Date: 2025/01/19 02:04:04 $
; %TIM <hh>:<mm> (<hh>: 0-23)
; %TIM1 <hh>:<mm> am|pm (<hh>: 1-12)
; %TIM2 <hh>:<mm>:<ss> (<hh>: 0-23)
;
N %TIM,%TIM1,%TIM2
D INT
W %TIM1
Q
INT N time,hh,hh2,mm,ss
S time=$P($H,",",2)
S hh=time\3600
S mm=time-(hh*3600)\60
S ss=time-(hh*3600)-(mm*60)
S %TIM=hh_":"_(mm\10)_(mm#10) ; like MSM
S hh2=(hh-1)#12+1
S %TIM1=$J(hh2,2)_":"_(mm\10)_(mm#10)_" "_$S(hh\13:"PM",1:"AM") ; like MSM
S %TIM2=%TIM_":"_(ss\10)_(ss#10)
Q
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>