How should I use Encoder.h if I want my motor to stop after a week of rotation?

I use this Encoder.h Encoder Library, for Measuring Quadarature Encoded Position or Rotation Signals.
And I use DC motor and a rotary encoder(1200p/r)(E6B2-CWZ6C OMRON).


But I don't know how to do if I want my DC motor to stop after a week of rotation and my motor spinning too fast.

Delta_G:
Encoders can measure how many times the motor turned, but they can't measure time. You need a clock to measure out a week of time and then turn the motor off.

Incremental encoder cannot measure the angle? Actually I want the motor to stop in a particular angle. I'm sorry that I didn't show my real goal.

Delta_G:
You said you wanted it to stop after one week. A week is 7 days. It is a measure of time. It is not an angle.

Now please use more than just one sentence and tell us what you really want and what you are really building. Please don't waste anymore of our time.

Sorry..
I want the motor turn to a particular angle. For example,after it rotates 360° I make it stop.
And I used the L298N to drive the motor.
I tried the code but it didn't work.

#include <Encoder.h>

Encoder myEnc(2,3);

const int in1 = 9;
const int in2 = 10;
const int en = 11;
long position  = -999;
float step = 0.3; // 1200/360=0.3
float angle;

void setup() {
  Serial.begin(115200);
  pinMode(in1,OUTPUT);
  pinMode(in2,OUTPUT);
  pinMode(en,OUTPUT);
  digitalWrite(in1,HIGH);
  digitalWrite(in2,LOW);
  digitalWrite(en,HIGH);
}

void loop() {
  long newPos = myEnc.read();
  if (newPos != position) {
    position = newPos;
    angle = (position/4.0)*step;  //4X counting
    Serial.println(angle);
    if(angle == 360.0)
    {
      digitalWrite(in1,LOW);  //let the motor stop
    }
    }
  }
}

Delta_G:
You should maybe check your math.

sorry.. 360/1200=0.3