Changeset 40 for ccr/trunk/p/CCRUTIL.m


Ignore:
Timestamp:
Jul 3, 2008, 9:02:47 PM (16 years ago)
Author:
Christopher Edwards
Message:

fixed spacing issues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ccr/trunk/p/CCRUTIL.m

    r36 r40  
    1 CCRUTIL ;CCRCCD/SMH - Various Utilites for generating the CCR/CCD;06/15/08
    2         ;;0.1;CCRCCD;;Jun 15, 2008;
    3        
    4         W "No Entry at Top!" Q
    5        
    6 FMDTOUTC(DATE,FORMAT)   ; Convert Fileman Date to UTC Date Format; PUBLIC; Extrinsic
    7         ; FORMAT is Format of Date. Can be either D (Day) or DT (Date and Time)
    8         ; If not passed, or passed incorrectly, it's assumed that it is D.
    9         ; FM Date format is "YYYMMDD.HHMMSS" HHMMSS may not be supplied.
    10         ; UTC date is formatted as follows: YYYY-MM-DDThh:mm:ss_offsetfromUTC
    11         ; UTC, Year, Month, Day, Hours, Minutes, Seconds, Time offset (obtained from Mailman Site Parameters)
    12         N UTC,Y,M,D,H,MM,S,OFF
    13         S Y=1700+$E(DATE,1,3)
    14         S M=$E(DATE,4,5)
    15         S D=$E(DATE,6,7)
    16         S H=$E(DATE,9,10)
    17         S MM=$E(DATE,11,12)
    18         S S=$E(DATE,13,14)
    19         S OFF=$$TZ^XLFDT ; See Kernel Manual for documentation.
    20         ; If H, MM and S are empty, it means that the FM date didn't supply the time.
    21         ; In this case, set H, MM and S to "00"
    22         S:('$L(H)&'$L(MM)&'$L(S)) (H,MM,S)="00"
    23         I S="" S UTC=Y_"-"_M_"-"_D_"T"_H_":"_MM_OFF
    24         E  S UTC=Y_"-"_M_"-"_D_"T"_H_":"_MM_":"_S_OFF
    25         I $L($G(FORMAT)),FORMAT="DT" Q UTC ; Date with time.
    26         E  Q $P(UTC,"T")
    27         ;
     1CCRUTIL ;CCRCCD/SMH - Various Utilites for generating the CCR/CCD;06/15/08
     2          ;;0.1;CCRCCD;;Jun 15, 2008;
     3         
     4          W "No Entry at Top!" Q
     5         
     6FMDTOUTC(DATE,FORMAT) ; Convert Fileman Date to UTC Date Format; PUBLIC; Extrinsic
     7          ; FORMAT is Format of Date. Can be either D (Day) or DT (Date and Time)
     8          ; If not passed, or passed incorrectly, it's assumed that it is D.
     9          ; FM Date format is "YYYMMDD.HHMMSS" HHMMSS may not be supplied.
     10          ; UTC date is formatted as follows: YYYY-MM-DDThh:mm:ss_offsetfromUTC
     11          ; UTC, Year, Month, Day, Hours, Minutes, Seconds, Time offset (obtained from Mailman Site Parameters)
     12          N UTC,Y,M,D,H,MM,S,OFF
     13          S Y=1700+$E(DATE,1,3)
     14          S M=$E(DATE,4,5)
     15          S D=$E(DATE,6,7)
     16          S H=$E(DATE,9,10)
     17          S MM=$E(DATE,11,12)
     18          S S=$E(DATE,13,14)
     19          S OFF=$$TZ^XLFDT ; See Kernel Manual for documentation.
     20          ; If H, MM and S are empty, it means that the FM date didn't supply the time.
     21          ; In this case, set H, MM and S to "00"
     22          S:('$L(H)&'$L(MM)&'$L(S)) (H,MM,S)="00"
     23          I S="" S UTC=Y_"-"_M_"-"_D_"T"_H_":"_MM_OFF
     24          E  S UTC=Y_"-"_M_"-"_D_"T"_H_":"_MM_":"_S_OFF
     25          I $L($G(FORMAT)),FORMAT="DT" Q UTC ; Date with time.
     26          E  Q $P(UTC,"T")
     27          ;
Note: See TracChangeset for help on using the changeset viewer.