else
/*
desription The first week is begin at first sunday of dealing year when Jan 1st is not
the first sunday of The dealing year.
*/
loop
/*
desription Get the date of the first sunday.
parameter vd_first_week_date
*/
if vi_loop_num > 6 then
exit;
else
if to_char(vd_flag_date+vi_loop_num,'D') = 1 then
vd_first_week_date := vd_flag_date+vi_loop_num;
exit;
else
vi_loop_num := vi_loop_num+1;
end if;
end if;
end loop;