Yahshua spoke as a prophet when He said, “We must work the works of him who sent me while it is day; night is coming when no one can work.” It was “day” during His time on earth because He was the light of the world. He made it clear that at some point in the future the darkness of “night” would come when no one would be able to do the works of God. He also told His disciples that they were the light of the world. He knew He was going to go away and that the Holy Spirit was going to be poured out on His disciples at Pentecost.
The Holy Spirit filling the souls of His disciples is what makes them the light of the world. So, when He was in the world and when His true disciples were in the world, light was in the world. That light manifested itself in the life of Acts 2:44, which began on the Day of Pentecost when the Holy Spirit brought to the apostles’ remembrance all that Yahshua had taught them.
Three thousand responded by obeying what Peter and the apostles said that day. They were baptized, sealed with the Holy Spirit, fulfilling the prophecy of Joel. The result was that “all who believed were together and shared all things in common.” The light that was in Yahshua had gone into His disciples, manifested in a life together, proving their love for Him and for one another. So, when and how did the darkness come? It was a progression. The light dimmed and faded into darkness.