Question: I want to check a certain date that is stored in my DB, if this date is during this fiscal year it prints **valid** if it is not it prints **invalid**

here is my php code:

```
$init_date= date("2016/07/01");
$end_date= date("2017/06/30");
$i_date = strtotime($init_date);
$e_date = strtotime($end_date);
$date_db= strtotime($date);// this $date is retrieved from my DB
if ($e_date > $date_db && $i_date < $date_db) 
     { echo "valid";}
else { echo "invalid";}

```

but the problem is that i don't want to set the start and the end dates manually, is there a way to make it dynamic? as it will be updated every year

Answer: 
If you are lucky then the ipynb file is corrupted but still there. In that case you can try opening it in a text file and copying the contents to a new notebook. But check the size of the file. If it is zero bytes, then there is nothing there!

This actually happened to me when my server ran out of memory and somehow the notebook got completely erased. Totally sucks.
in your file directory that contains your ipynb file there is a folder called '.ipynb\_checkpoints'. this folder does not show in the jupyter application so find it through windows explorer.
inside there's will be a file called urfilenamehere-checkpoint.ipynb
copy paste it to your file directory and open through the jupyter application it should probably work.

if your corrupted file is 0B, you definitely have to rely on the checkpoints. 

do not create a new notebook with the same name it will overwrite the checkpoint.