loading

What is the sensor in the night light for it to turn off during daylight and on during night time?

I just saw this instructable https://www.instructables.com/id/LED-CLOCK-cum-NIGHT-LAMP/
I just thought of an idea not to waste my battery so that is why i am asking what is the sensor called
my night light looks like this http://www.google.com.ph/imglanding?q=Omni+LED+night+light&um=1&hl=en&sa=N&rlz=1C1DVCC_enPH364PH364&tbs=isch:1&tbnid=wNfOs1_LTi0egM:&imgrefurl=http://www.mchomedepot.com/index.php%253Froute%253Dproduct/product%2526manufacturer_id%253D104%2526product_id%253D6346&imgurl=http://www.mchomedepot.com/image/cache/data/2800510000037-500x500.jpg&ei=s6OITZyBJYHSuwPty8yCDg&zoom=1&w=500&h=500&iact=hc&oei=s6OITZyBJYHSuwPty8yCDg&page=1&tbnh=162&tbnw=162&start=0&ved=1t:429,r:3,s:0&biw=1600&bih=799
i'm asking what is the middle part of it :D


and sorry for my bad english :D