Pregnancy test question

Is taking a pregnancy test 4 days before your period due okay and accurate?