Article says the image is from a 503 day exposure--it doesn't say how, if at all, the nighttime data is decoupled from the daytime data. Perhaps it is something like "technically 0.0001% of this image might be from nighttime readings".
The daytime data and night time data are decoupled quite easily. Whenever an event is recorded by the detector you just make sure a timestamp is associated with the event. Then you use that timestamp to determine the location of the sun at the time of the event. If the sun is below the horizon it's "night" and if it's above the horizon it's day.