Time-dependant threejs file

Hi everyone!

Was wondering if there is a way to make my .js file to connect to the date/time on my laptop. For example, Id like my threejs art to go darker when its night time and brighter during day time. Also greener during spring and browner during autumn. Is there a possible way to link a time stamp to my code?

Yes, it is possible. Use the JavaScript Date object.

Example. The current hour is new Date().getHours().