Actually the 2 day dark period has a few purposes. The length is usually 2-3 days in complete darkness and preferably, have a dry medium if in soil. Plants need light to make chlorophyll, 2-3 days in the darkness causes the plant to stop producing chlorophyll. This improves curing time, taste and bag appeal.
The darkness stresses the plant into thinking the flowering season is in ending so it reacts by producing more trichomes in a last ditch effort to "get pregnant", lol.