source: WorldVistAEHR/trunk/r/VICTORY_PROGRAMMING_ENVIRONMENT-ZVEM/ZVEMSFC.m@ 1073

Last change on this file since 1073 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 3.4 KB
RevLine 
[613]1ZVEMSFC ;DJB,VSHL**%DTC [04/17/94]
2 ;;12;VPE;;COPYRIGHT David Bolduc @1993
3 ;
4%DTC ;;;
5 ;;; % D T C Date/Time Manipulation
6 ;;;
7 ;;; 1. ENTRY POINT: ^%DTC
8 ;;; Return number of days between two dates.
9 ;;;
10 ;;; 2. INPUT VARIABLES
11 ;;; X1.......1st date
12 ;;; X2.......2nd date
13 ;;;
14 ;;; 3. OUTPUT VARIABLES
15 ;;; X........Number of days between the 2 dates (X2-X1).
16 ;;; %Y.......1 = Dates have both month and day values.
17 ;;; 0 = Dates were imprecise and not workable.
18 ;;;
19 ;;; 1. ENTRY POINT: C^%DTC
20 ;;; Add or subtract a number of days to a date.
21 ;;;
22 ;;; 2. INPUT VARIABLES
23 ;;; X1.......Date in VA Fileman format.
24 ;;; X2.......If positive, number of days to add. If negative, number of
25 ;;; days to subtract.
26 ;;;
27 ;;; 3. OUTPUT VARIABLES
28 ;;; X........Resulting date.
29 ;;; %H.......The $H form of the date.
30 ;;;
31 ;;; 1. ENTRY POINT: H^%DTC
32 ;;; Converts a VA Fileman date/time to a $H format.
33 ;;;
34 ;;; 2. INPUT VARIABLES
35 ;;; X.......Date in VA Fileman format.
36 ;;;
37 ;;; 3. OUTPUT VARIABLES
38 ;;; %H.......The $H form of the date. If date is imprecise, then first of
39 ;;; the month or year is returned.
40 ;;; %T.......The time in $H format. If no time, %T equals zero.
41 ;;; %Y.......Day-of-week as numberic from 0 to 6. 0=Sunday. If the date is
42 ;;; imprecise, %Y equals -1.
43 ;;;
44 ;;; 1. ENTRY POINT: DW^%DTC
45 ;;; This entry point produces results similar to H^%DTC. The difference is
46 ;;; that X is reset to the name of the day. If the date is imprecise, X
47 ;;; is returned equal to null.
48 ;;;
49 ;;; 1. ENTRY POINT: NOW^%DTC
50 ;;; Returns the current date/time in VA Fileman and $H formats.
51 ;;;
52 ;;; 2. OUTPUT VARIABLES
53 ;;; %..........VA Fileman date/time to the second.
54 ;;; %H.........$H date/time.
55 ;;; %I(1)......Numeric value of the month.
56 ;;; %I(2)......Numeric value of the day.
57 ;;; %I(3)......Numeric value of the year.
58 ;;; X..........VA Fileman date only.
59 ;;;
60 ;;; 1. ENTRY POINT: YMD^%DTC
61 ;;; Converts $H format date to VA Fileman format.
62 ;;;
63 ;;; 2. INPUT VARIABLES
64 ;;; %H.........A $H format date/time.
65 ;;;
66 ;;; 3. OUTPUT VARIABLES
67 ;;; %..........Time to the second, as a decimal. If %H doesn't have time,
68 ;;; % equals zero.
69 ;;; X..........Date in VA Fileman format.
70 ;;;
71 ;;; 1. ENTRY POINT: YX^%DTC
72 ;;; Converts $H format date to VA Fileman format and to a printable date/time.
73 ;;;
74 ;;; 2. INPUT VARIABLES
75 ;;; %H.........A $H format date/time.
76 ;;;
77 ;;; 3. OUTPUT VARIABLES
78 ;;; Y..........The date and time (if time's sent) in external format. Seconds
79 ;;; will be included if the input contained seconds.
80 ;;; %..........Time to the second, as a decimal. If %H doesn't have time,
81 ;;; then % equals zero.
82 ;;; X..........Date in VA Fileman format.
83 ;;;
84 ;;; 1. ENTRY POINT: S^%DTC
85 ;;; Converts seconds from midnight to hours, min, and sec as decimal part
86 ;;; of a VA Fileman date.
87 ;;;
88 ;;; 2. INPUT VARIABLES
89 ;;; %..........Number of seconds from midnight, $P($H,",",2).
90 ;;;
91 ;;; 3. OUTPUT VARIABLES
92 ;;; %..........Decimal part of a VA Fileman date.
93 ;;;
94 ;;; 1. ENTRY POINT: HELP^%DTC
95 ;;; Displays help prompt based on %DT and %DT(0).
96 ;;;
97 ;;; 2. INPUT VARIABLES
98 ;;; %DT........Same as %DT
99 ;;; %DT(0).....Optional. Causes HELP to display upper or lower bound
100 ;;; that is acceptable for this particular call.
101 ;;;***
Note: See TracBrowser for help on using the repository browser.