You could use Virtual Calendar to do that.
https://community.smartthings.com/t/sunrise-sunset-and-calendar-functions-for-edge/242975/18?u=sakari