function TjYear(rq IN DATE)return INTEGER
IS
re integer;
BEGIN
if rq is null thenreturn null;
end if;
re:=extract(year from (rq));
if rq>=to_date(re||'1226000000','YYYYMMDDhh24miss') then
re:=re+1;
end if;
return re;
END TjYear;
function TjMonth(rq IN DATE)return INTEGER
IS
s_month integer;
s_day integer;
BEGIN
if rq is null thenreturn null;
end if;
s_month:=extract(month from(rq));
s_day:=extract(day from (rq));
if s_month>=1 and s_month<=11 then
if s_day>=26 then
s_month:=s_month+1;
end if;
elsif s_month=12 then
if s_day>=26 then
s_month:=1;
end if;
end if;
return s_month;
END TjMonth;