Annual reminder code help

I have a sketch that will count the number of days since an event and print them to a adafruit 7 segment backpack. After the day count reaches the display max (9999) it will then display the weeks since the event. The code works as intended up to this point.

I want to add one more feature though, on the anniversary of the event I want it to display the years since the event. I just want it to do this for the anniversary day, then revert back to the normal display routine. The way it is written now it works, but will only work for this first anniversary. This portion of code was only written this way for testing.

I am also confused how to tell the code when to start tracking time since the event. Obviously when I upload the code it will not be the anniversary date, so I need to give it a starting point to count from.

Can someone please give me some advice?

Thanks

#include <TimeLib.h>
#include <SPI.h>
#include <Wire.h>
#include "Adafruit_LEDBackpack.h"
#include "Adafruit_GFX.h"
#include "RTClib.h"


// I2C address of the display.

#define DISPLAY_ADDRESS   0x70

// Create display and DS1307 objects.  These are global variables that
// can be accessed from both the setup and loop function below.

Adafruit_7segment clockDisplay = Adafruit_7segment();
RTC_DS1307 rtc = RTC_DS1307();

// Keep track of the hours, minutes, seconds displayed by the clock.
// Start off at 0:00:00 as a signal that the time should be read from
// the DS1307 to initialize it.

int hours = 0;
int minutes = 0;
int seconds = 0;

unsigned long WeddingDate = 1059177600   ;  //in unixtime
unsigned long days ;
int weeks ;
int years ;

unsigned long previousMillis = 0; // Will store last time event happened   

unsigned long interval = 31536000000; // Milliseconds in a year
unsigned long lastAnniv = 1469491200; // in unixtime (seconds)
unsigned long intervalDayEnd = (interval + 86400); // End of anniversary day

void setup() {
  
  // Setup function runs once at startup to initialize the display
  // and DS1307 clock.
  Serial.begin(115200);
  Serial.println("Clock starting!");

  // Setup the display.
  clockDisplay.begin(DISPLAY_ADDRESS);
  
  // Setup the DS1307 real-time clock.
  rtc.begin();
  

  // Set the DS1307 clock if it hasn't been set before.
  bool setClockTime = !rtc.isrunning();
  // Alternatively you can force the clock to be set again by
  // uncommenting this line:
  setClockTime = true;
  if (setClockTime) {
    Serial.println("Setting DS1307 time!");
    // This line sets the DS1307 time to the exact date and time the
    // sketch was compiled:
    rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
    // Alternatively you can set the RTC with an explicit date & time, 
    // for example to set July 25, 2014 at 12:59 am you would uncomment:
    //rtc.adjust(DateTime(2060, 7, 26, 23, 59, 30));
    
      
   }
}

void loop() {
  // Loop function runs over and over again to implement the clock logic.
    DateTime now = rtc.now();  // Returns the current time as seconds 
    
    int days = ((now.unixtime() - WeddingDate) / 86400); //Converts to unixttime, calculates days
    int weeks = ((now.unixtime() - WeddingDate) / (86400 * 7)); //Converts to unixttime, calculates weeks
    int years = ((now.unixtime() - WeddingDate) / (86400 * 365)); //Converts to unixttime, calculates years
    
    unsigned long previousMillis = (now.unixtime() - lastAnniv) ; // since last event 
    unsigned long daysSinceAnniv = (previousMillis / 86400) ; //converts to days
    
    Serial.print(" Today Unixtime = ");
    Serial.println(now.unixtime());
    
    Serial.print(" Days Since Anniversary = ");
    Serial.println(daysSinceAnniv);   
    
    Serial.print(" Days Married = ");
    Serial.print((now.unixtime() - WeddingDate) / 86400);
    Serial.println(" days");

    Serial.print(" Weeks Married = ");
    Serial.print((now.unixtime() - WeddingDate) / (86400 * 7));
    Serial.println(" weeks");

    Serial.print(" Years Married = ");
    Serial.print((now.unixtime() - WeddingDate) / (86400 * 365));
    Serial.println(" years");

   

    clockDisplay.setBrightness(0); //sets display brightness 0 = dimmest, 15 = brightest

    if(days > 9999) //when days are greater than display range, switch display to show weeks
    {   
     clockDisplay.print(weeks);
    }
    else  
    {  
    clockDisplay.print(days);
    }

    
     //find out if it is anniversary or not
     unsigned long currentMillis = millis();
     Serial.print(currentMillis);
     if(daysSinceAnniv >= 365 && daysSinceAnniv < 366) // when its 365 days since last
     {
     clockDisplay.print(years);
     } 
    
     clockDisplay.writeDisplay(); // NEEDED TO PUSH print() command to display!!!!
     
     {
     
     delay(10000);
     
     }

}
int hours = 0;
int minutes = 0;
int seconds = 0;

Are there more than 255 hours in a day on your planet? Are there more than 255 minutes in an hour on your planet? Are there more than 255 seconds in a minute on your planet?

Your last anniversary date isn't fixed, is it? On July 23rd, mine changes. Doesn't yours?

Isn't that why the code only works on your anniversary date once?

PaulS: int hours = 0; int minutes = 0; int seconds = 0;

Are there more than 255 hours in a day on your planet? Are there more than 255 minutes in an hour on your planet? Are there more than 255 seconds in a minute on your planet?

Your last anniversary date isn't fixed, is it? On July 23rd, mine changes. Doesn't yours?

Isn't that why the code only works on your anniversary date once?

Can you please explain what you are getting at? I am not following. The issue might seem obvious to you, but it isn't to me...hence the "newbie" under my user name. I picked this up as a hobby and I am trying to learn it.

Ups.

Somewhere\sketch_feb10a.ino:1:26: warning: large integer implicitly truncated to unsigned type [-Woverflow]

 unsigned long interval = 31536000000; // Milliseconds in a year

                          ^

Can you please explain what you are getting at?

There is no sense wasting memory on ints when bytes are sufficient.

As for the variable, lastAnniv, shouldn't that take on a new value on your anniversary date?