how to code Time[-1]?

 
Time[0] is time on the current bar. Time[-1] is time of the next bar, which can be some time next week. is there a script somewhere for this?
 
datetime Time2(int shift){
   if (shift >= 0){
      return(Time[shift]);
   }else{
      return(Time[0] - Period() * 60 * shift);
   }
}
Reason: