Conditional Criteria to filter Report? PROBLEM SOLVED

Conditional Criteria to filter Report? PROBLEM SOLVED

BACKGROUND INFO

The weekly cycle in my app is Thu-Wed.

Records have an integer field called WK which stands for Week.

Records created Thu-Sat are assigned the week ahead, i.e. WK = Added_time.getWeekOfYear() + 1

Records created Sun-Wed are assigned the current week ahead, i.e. WK = Added_time.getWeekOfYear()

QUESTION

How can I set a criteria to select records on a report so that
IF viewing the report on Thu, Fri, or Sat
THEN record criteria is  Week = Added_time.getWeekOfYear() + 1
and
IF viewing the report on Sun, Mon, Tue, or Wed
THEN record criteria is  Week = Added_time.getWeekOfYear()

Is is possible to place the  Report Definition  Criteria Deluge Script within a Conditional IF-THEN statement in the Definition? If not, how else might I solve this problem? Could I create multiple clones of the report and place IF-THEN statements within an html Page to feed the proper report depending on the day of the week the Page is opened? Any ideas out there? SEE UPDATE NOTES AT BOTTOM.

I have tried to insert this script into the definition, but I get the error "null".
  1. if(zoho.currenttime.getDayOfWeek() > 4)
  2. {
  3.     show  all  rows  from  TimeSheetTexts [(TimeLapse > 0.0 && WK == zoho.currentdate.getWeekOfYear() + 1)]
  4. }
  5. if(zoho.currenttime.getDayOfWeek() < 5)
  6. {
  7.     show  all  rows  from  TimeSheetTexts [(TimeLapse > 0.0 && WK == zoho.currentdate.getWeekOfYear()]
  8. }

UPDATE NOTES: It happens quite often that soon after the time I get frustrated enough to post here, I finally discover a solution.  The solution was to add an integer field called DayOfWK and have a schedule set that value first thing every morning to  zoho.currenttime.getDayOfWeek()   and then set this criteria for the Report: 
WK == zoho.currentdate.getWeekOfYear() +1 || (WK == zoho.currentdate.getWeekOfYear() &&  DayOfWK < 5

Viewers Sun through Wed when all the records will have a  DayOfWK  value less than 5 see all the "current" week records (which include the Thu-Sat records from the week before which had their WK field set one week forward). Viewers Thu through Sat do NOT see the records before Thu since all  DayOfWK  values are then 5 or greater and thus the only records that show are those who have been set a week ahead.