123456789101112131415161718192021222324252627282930 |
- $PBExportHeader$f_mth.srf
- global type f_mth from function_object
- end type
- forward prototypes
- global function long f_mth (long arg_month)
- end prototypes
- global function long f_mth (long arg_month);Long ll_mth,ll_temp
- String ls_mth,ls_mth2
- ls_mth = Right(String(arg_month),2)
- ls_mth2 = String(Long(Left(String(arg_month),4)) - 1)
- ll_temp = Long(ls_mth) - 1
- IF ll_temp = 0 THEN
- ll_mth = Long(ls_mth2 + '12')
- ELSEIF ll_temp = -1 THEN
- ll_mth = Long(ls_mth2 + '11')
- ELSE
- ll_mth = arg_month - 1
- END IF
- RETURN ll_mth
- end function
|