Files
open-insight/LSL2/OIEVENT/CLICK/WO_MAST_SCHED.QCFG_DATE_BUTTON.json
2024-03-25 15:12:53 -07:00

11 lines
1.8 KiB
JSON

{
"header": {
"version": 1,
"type": "record"
},
"body": {
"record1": {
"<1>": "declare function msg\r\n$insert msg_equates\r\n\r\nColRow = .sched_info->selpos\r\nCurLabels = .sched_info->label\r\nCol = ColRow<1>\r\nRow = ColRow<2>\r\nif Col = 31 then\r\n Col = 1\r\n .sched_info->selpos = Col:@fm:Row\r\n MsgInfo = ''\r\n MsgInfo<mtext$> = 'You are currently on the last day...You will now be placed on the first day.'\r\n MsgInfo<micon$> = 'H'\r\n Void = msg( '', MsgInfo )\r\n return 0\r\nend\r\nCurLabel = CurLabels<Col>\r\nDay = field( CurLabel, ' ', 1 )\r\nMonth = field( CurLabel, ' ', 2 )\r\nDate = field( CurLabel, ' ', 3 )\r\nYear = field( CurLabel, ' ', 4 )\r\nMonths = 'January/February/March/April/May/June/July/August/September/October/November/December'\r\nDays = 'Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday'\r\nconvert '/' to @fm in Months\r\nconvert '/' to @fm in Days\r\nlocate Month in Months using @fm setting MPos else\r\n MPos = 0\r\nend\r\nlocate Day in Days using @fm setting DPos then\r\n if DPos = 7 then\r\n DPos = 1\r\n end else\r\n DPos += 1\r\n end\r\nend else\r\n DPos = 0\r\nend\r\n* SEE IF NEXT DAY IS A VALID DATE OR NOT\r\nTDate = date + 1\r\nTTDate = iconv( Months<Mpos>:'/':TDate:'/':Year, 'D' )\r\nif TTDate then\r\n NewLabel = ''\r\n if TDate < 10 then\r\n TDate = 0:TDate\r\n end\r\n NewLabel = Days<DPos>:' ':Month:' ':TDate:' ':Year\r\nend else\r\n NewLabel = ''\r\n if MPos > 11 then\r\n MPos = 0 ;* SO IT WILL BE SET TO JANUARY BELOW WITH MPOS+1\r\n end\r\n NewLabel = Days<DPos>:' ':Months<MPos+1>:' 01':' ':Year\r\nend\r\nCol += 1\r\n.sched_info->selpos = Col:@fm:Row\r\nCurLabels<Col> = NewLabel\r\n.sched_info->label = CurLabels\r\nRETURN 0"
}
}
}