DBA Data[Home] [Help]

PACKAGE BODY: APPS.HRI_OLTP_DISC_TIME

Source


1 PACKAGE BODY hri_oltp_disc_time  AS
2 /* $Header: hriodtim.pkb 115.1 2003/12/08 07:11:13 knarula noship $ */
3 --
4 /**************************************************************************
5 Description   : For a given date, this function finds the start date of the
6 		period in which the date lies.
7 		The period can be 'YEAR','SEMIYEAR','QUARTERYEAR',
8 		'BIMONTH','MONTH'.
9 		This is a wrapper function for function GET_PERIOD_START_DATE
10 		in the package HRI_BPL_TIME
11 Preconditions : None
12 In Parameters : p_start_date 	IN DATE
13 		p_period 	IN VARCHAR2
14 Post Sucess   : It returns the start date for the period
15 Post Failure  : Returns p_start_date being sent as input
16 ***************************************************************************/
17 FUNCTION get_period_start_date(p_start_date	IN DATE,
18 			       p_period		IN VARCHAR2)
19 RETURN DATE IS
20 --
21 l_start_date		DATE;
22 --
23 begin
24 	--
25 	l_start_date := hri_bpl_time.get_period_start_date(p_start_date,p_period);
26 	return l_start_date;
27 	--
28 exception
29 	--
30 	when others then
31 		return (p_start_date);
32 	--
33 END get_period_start_date;
34 
35 --
36 -- get_period_end_date
37 --
38 /**************************************************************************
39 Description   : For a given date, this function finds the end date of the
40 		period in which the date lies.
41 		The period can be 'YEAR','SEMIYEAR','QUARTERYEAR',
42 		'BIMONTH','MONTH'.
43 		This is a wrapper function for function GET_PERIOD_END_DATE
44 		in the package HRI_BPL_TIME
45 Preconditions : None
46 In Parameters : p_end_date 	IN DATE
47 		p_period 	IN VARCHAR2
48 Post Sucess   : It returns the end date for the period
49 Post Failure  : Returns p_end_date being sent as input
50 ***************************************************************************/
51 FUNCTION get_period_end_date(p_end_date		IN DATE,
52 			     p_period		IN VARCHAR2)
53 RETURN DATE IS
54 --
55 l_end_date		DATE;
56 --
57 begin
58 	--
59 	l_end_date := hri_bpl_time.get_period_end_date(p_end_date,p_period);
60 	return l_end_date;
61 	--
62 exception
63 	when others then
64 		return (p_end_date);
65 --
66 END get_period_end_date;
67 --
68 END hri_oltp_disc_time;