open-insight/LSL2/STPROC/MAST_SCHED_TODAY_DATE.txt
Infineon\StieberD 7762b129af pre cutover push
2024-09-04 20:33:41 -07:00

20 lines
496 B
Plaintext

compile function mast_sched_today_date( DateToUse )
* DATE TO USE SHOULD BE PASSED AS AN ICONV OR DATE(), ETC
if assigned( DateToUse ) else
DateToUse = date()
end
if DateToUse = '' then
DateToUse = date()
end
DayPos = mod( DateToUse, 7 )+1
Days = 'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday'
convert ',' to @fm in Days
CurDay = Days<DayPos>
CurDate = oconv( DateToUse, 'D4,HL' )
convert ',' to ' ' in CurDate
CurDate = CurDay:' ':CurDate
return CurDate