1 PACKAGE FII_TIME_WH_API AS
2 /* $Header: FIIQTRSS.pls 120.0 2002/08/24 05:01:09 appldev noship $ */
3 VERSION CONSTANT CHAR(80) := '$Header: FIIQTRSS.pls 120.0 2002/08/24 05:01:09 appldev noship $';
4
5 -- -------------------------------------------------------------------
6 -- Name: ent_cycq_start
7 -- Desc: Returns quarter start date for current year current
8 -- quarter (cycq) in the enterprise calendar. Current quarter
9 -- calculated based on sysdate. Info is cached after initial access
10 -- Output: Enterprise calendar current quarter start date
11 -- Error: If any sql errors occurs, an exception is raised.
12 -- --------------------------------------------------------------------
13 Function ent_cycq_start return DATE;
14
15 -- -------------------------------------------------------------------
16 -- Name: ent_cycq_end
17 -- Desc: Returns quarter end date for current year current
18 -- quarter (cycq) in the enterprise calendar. Current quarter
19 -- calculated based on sysdate. Info is cached after initial access
20 -- Output: Enterprise calendar current quarter end date
21 -- Error: If any sql errors occurs, an exception is raised.
22 -- --------------------------------------------------------------------
23 Function ent_cycq_end return DATE;
24
25 -- -------------------------------------------------------------------
26 -- Name: ent_lycq_start
27 -- Desc: Returns quarter start date for last year current quarter
28 -- (lycq) in the enterprise calendar. Info is cached after
29 -- initial access
30 -- Output: Enterprise calendar last year same quarter start date
31 -- Error: If any sql errors occurs, an exception is raised.
32 -- --------------------------------------------------------------------
33 Function ent_lycq_start return DATE;
34
35 -- -------------------------------------------------------------------
36 -- Name: ent_lycq_end
37 -- Desc: Returns quarter end date for last year current quarter
38 -- (lycq) in the enterprise calendar. Info is cached after
39 -- initial access
40 -- Output: Enterprise calendar last year same quarter end date
41 -- Error: If any sql errors occurs, an exception is raised.
42 -- --------------------------------------------------------------------
43 Function ent_lycq_end return DATE;
44
45 -- -------------------------------------------------------------------
46 -- Name: ent_cy_start
47 -- Desc: Returns year start date for current year
48 -- in the enterprise calendar. Current year
49 -- calculated based on sysdate. Info is cached after initial access
50 -- Output: Enterprise calendar current year start date
51 -- Error: If any sql errors occurs, an exception is raised.
52 -- --------------------------------------------------------------------
53 Function ent_cy_start return DATE;
54
55 -- -------------------------------------------------------------------
56 -- Name: ent_cy_end
57 -- Desc: Returns year end date for current year
58 -- in the enterprise calendar. Current year
59 -- calculated based on sysdate. Info is cached after initial access
60 -- Output: Enterprise calendar current year end date
61 -- Error: If any sql errors occurs, an exception is raised.
62 -- --------------------------------------------------------------------
63 Function ent_cy_end return DATE;
64
65 -- -------------------------------------------------------------------
66 -- Name: ent_ly_start
67 -- Desc: Returns year start date for last year
68 -- in the enterprise calendar. Last year
69 -- calculated based on sysdate - 12 months. Info is cached after initial access
70 -- Output: Enterprise calendar last year start date
71 -- Error: If any sql errors occurs, an exception is raised.
72 -- --------------------------------------------------------------------
73 Function ent_ly_start return DATE;
74
75 -- -------------------------------------------------------------------
76 -- Name: ent_ly_end
77 -- Desc: Returns year end date for last year
78 -- in the enterprise calendar. Last year
79 -- calculated based on sysdate - 12 months. Info is cached after initial access
80 -- Output: Enterprise calendar last year end date
81 -- Error: If any sql errors occurs, an exception is raised.
82 -- --------------------------------------------------------------------
83 Function ent_ly_end return DATE;
84
85 -- -------------------------------------------------------------------
86 -- Name: ent_lycq_today1
87 -- Desc: Returns today's equavalent day in the same quarter from last
88 -- year in the enterprise calendar. The equavlent day is
89 -- established by counting backwards the same # of days from
90 -- the end of the quarter. Info is cached after initial access
91 -- Output: Enterprise calendar last year same quarter today (variation 1)
92 -- Error: If any sql errors occurs, an exception is raised.
93 -- --------------------------------------------------------------------
94 Function ent_lycq_today1 return DATE;
95
96 -- -------------------------------------------------------------------
97 -- Name: ent_lycq_today1
98 -- Desc: Returns today's equavalent day in the same quarter from last
99 -- year in the enterprise calendar. The equavlent day is
100 -- established by counting same # of days into the quarter from
101 -- the start of the quarter. Info is cached after initial access
102 -- Output: Enterprise calendar last year same quarter today (variation 2)
103 -- Error: If any sql errors occurs, an exception is raised.
104 -- --------------------------------------------------------------------
105 Function ent_lycq_today2 return DATE;
106
107
108 -- -------------------------------------------------------------------
109 -- Name: today
110 -- Desc: Returns today's date, time element truncated. If the profile
111 -- FII_FIXED_DATE is set, then it returns the fixed date. Otherwise
112 -- it returnes sysdate
113 -- Output: Todays date
114 -- Error: If any sql errors occurs, an exception is raised.
115 -- --------------------------------------------------------------------
116 FUNCTION today RETURN DATE;
117
118
119 -- -------------------------------------------------------------------
120 -- Name: todaytime
121 -- Desc: Returns today's date with time element. If the profile
122 -- FII_FIXED_DATE is set, then it returns the fixed date. Otherwise
123 -- it returnes sysdate
124 -- Output: Todays date
125 -- Error: If any sql errors occurs, an exception is raised.
126 -- --------------------------------------------------------------------
127 FUNCTION todaytime RETURN DATE;
128
129
130 -- -------------------------------------------------------------------
131 -- Name: get_fqtr_start
132 -- Desc: Returns the smallest quarter start date for the current quarter
133 -- across all the financial and enterprise calendars.
134 -- Output: Minium quarter start date
135 -- Error: If any sql errors occurs during
136 -- execution, an exception is raised.
137 -- --------------------------------------------------------------------
138 Function get_fqtr_start return DATE;
139
140
141 -- -------------------------------------------------------------------
142 -- Name: get_fqtr_end
143 -- Desc: Returns the largest quarter end date for the current quarter
144 -- across all the financial and enterprise calendars.
145 -- Output: Maximum quarter start date
146 -- Error: If any sql errors occurs during
147 -- execution, an exception is raised.
148 -- --------------------------------------------------------------------
149 FUNCTION get_fqtr_end RETURN DATE;
150
151 -- -------------------------------------------------------------------
152 -- Name: get_curr_eqtr_start
153 -- Desc: Functional obsolete, kept for backward compatibility. Please
154 -- use ent_cycq_start instead
155 -- --------------------------------------------------------------------
156 Function get_curr_eqtr_start return DATE;
157
158 -- -------------------------------------------------------------------
159 -- Name: get_curr_eqtr_end
160 -- Desc: Functional obsolete, kept for backward compatibility. Please
161 -- use ent_cycq_end instead
162 -- --------------------------------------------------------------------
163 Function get_curr_eqtr_end return DATE;
164
165 -- -------------------------------------------------------------------
166 -- Name: get_cycq_pk_key
167 -- Desc: Returns the quarter pk key of the current quarter with the the earliest
168 -- start date
169 -- --------------------------------------------------------------------
170 Function get_cycq_pk_key return NUMBER;
171
172 -- -------------------------------------------------------------------
173 -- Name: get_cycm_pk_key
174 -- Desc: Returns the month pk key of the current month with the the earliest
175 -- start date
176 -- --------------------------------------------------------------------
177 Function get_cycm_pk_key return NUMBER;
178
179 -- -------------------------------------------------------------------
180 -- Name: ent_today
181 -- Desc: Getting either the profile date or today's date
182 -- --------------------------------------------------------------------
183 Function ent_today return DATE;
184
185
186 PRAGMA RESTRICT_REFERENCES (ent_cycq_start, WNDS);
187 PRAGMA RESTRICT_REFERENCES (ent_cycq_end, WNDS);
188 PRAGMA RESTRICT_REFERENCES (ent_lycq_start, WNDS);
189 PRAGMA RESTRICT_REFERENCES (ent_lycq_end, WNDS);
190 PRAGMA RESTRICT_REFERENCES (ent_cy_start, WNDS);
191 PRAGMA RESTRICT_REFERENCES (ent_cy_end, WNDS);
192 PRAGMA RESTRICT_REFERENCES (ent_ly_start, WNDS);
193 PRAGMA RESTRICT_REFERENCES (ent_ly_end, WNDS);
194 PRAGMA RESTRICT_REFERENCES (ent_lycq_today1, WNDS);
195 PRAGMA RESTRICT_REFERENCES (ent_lycq_today2, WNDS);
196 PRAGMA RESTRICT_REFERENCES (today, WNDS);
197 PRAGMA RESTRICT_REFERENCES (todaytime, WNDS);
198 PRAGMA RESTRICT_REFERENCES (get_fqtr_start, WNDS);
199 PRAGMA RESTRICT_REFERENCES (get_fqtr_end, WNDS);
200 PRAGMA RESTRICT_REFERENCES (get_curr_eqtr_start, WNDS);
201 PRAGMA RESTRICT_REFERENCES (get_curr_eqtr_end, WNDS);
202 PRAGMA RESTRICT_REFERENCES (get_cycq_pk_key, WNDS);
203 PRAGMA RESTRICT_REFERENCES (get_cycm_pk_key, WNDS);
204
205
206
207 /* Future functions
208 Function fis_cycq_start(cal_name_pk_key NUMBER) return DATE;
209 Function fis_cycq_end(cal_name_pk_key NUMBER) return DATE;
210 Function fis_lycq_start(cal_name_pk_key NUMBER) return DATE;
211 Function fis_lycq_end(cal_name_pk_key NUMBER) return DATE;
212 Function fis_lycq_today1(cal_name_pk_key NUMBER) return DATE;
213 Function fis_lycq_today2(cal_name_pk_key NUMBER) return DATE;
214 */
215
216
217
218 end;