I think you just have to get the notesdatetime... something like
var ndt = document1.getItemValueDateTime("lastMainRep1");
if(ndt.getDateOnly()==""){return null;}
var freq = document1.getItemValueDouble("Frequency");
var newdt = @Adjust(ndt.getLocalTime(),0,0,freq,0,0,0);
//convert to java date for display formatting
var jdt = newdt.toJavaDate();
jdt