diff --git a/whatformat/util/whatdateformat.py b/whatformat/util/whatdateformat.py
index 0fc5eb3ed49d2ba0e665efa454effece7d6b4fb9..e069bcb4012fc2be783a52258a0858c9fa318173 100644
--- a/whatformat/util/whatdateformat.py
+++ b/whatformat/util/whatdateformat.py
@@ -1,6 +1,7 @@
 """Function(s) for getting a format string from a date string."""
 
 import re
+from copy import copy
 from itertools import product
 from collections import defaultdict, Counter
 from typing import Dict, Iterator, List
@@ -15,9 +16,11 @@ FORMAT_DIRECTIVES = [
 DATE_TOKEN_REGEX = re.compile(r'([\w]+)|([\W]+)')
 
 
-# pylint: disable=too-many-locals
-def get_all_format_strings(date_string, allow_reuse=False,
-                           no_zero=False) -> Iterator[str]:
+# pylint: disable=too-many-locals,too-many-branches
+def _get_all_format_strings(date_string, allow_reuse=False,
+                            include_day_of_year=False,
+                            include_week_number=False,
+                            no_zero=False) -> Iterator[str]:
     """Yield date format strings which match date_string."""
     try:
         parsed_datetime = parse(date_string)
@@ -26,7 +29,14 @@ def get_all_format_strings(date_string, allow_reuse=False,
         return
     tokens = DATE_TOKEN_REGEX.findall(date_string)
     possible_matches = defaultdict(list)  # type: Dict[str, List[str]]
-    for test_format in FORMAT_DIRECTIVES:
+    format_directives = copy(FORMAT_DIRECTIVES)
+    if not include_day_of_year:
+        format_directives.remove('%-j')
+        format_directives.remove('%j')
+    if not include_week_number:
+        for directive in ('%W', '%w', '%U'):
+            format_directives.remove(directive)
+    for test_format in format_directives:
         test_string = parsed_datetime.strftime(test_format)
         possible_matches[test_string.lower()].append(test_format)
         possible_parts = []
@@ -46,7 +56,7 @@ def get_all_format_strings(date_string, allow_reuse=False,
             if not allow_reuse:
                 counts = Counter(sequence)
                 max_count = max(
-                    counts[diretive] for diretive in FORMAT_DIRECTIVES)
+                    counts[diretive] for diretive in format_directives)
                 if max_count > 1:
                     continue
             format_string = "".join(sequence)
@@ -77,4 +87,4 @@ def _remove_extra_nlz(combinations) -> Iterator[List[str]]:
 
 def get_unique_format_strings(date_string, allow_reuse=False) -> List[str]:
     """Return date format strings matching date_string, without duplicates."""
-    return list(set(get_all_format_strings(date_string, allow_reuse)))
+    return list(set(_get_all_format_strings(date_string, allow_reuse)))