oracle8.1.6
select to_char(to_date(:current_date, 'yyyy-mm-dd'), 'D')
as day_of_the_week,
to_char(next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'Sunday'))
as sunday_of_the_week,
to_char(next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'Sunday'),'J')
as sunday_julian,
to_char(next_day(to_date(:current_date, 'yyyy-mm-dd'), 'Saturday'))
as saturday_of_the_week
from dual