We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Norwegian ssn returns the wrong format for the date part 
SSN for no_NO returns the wrong format of the date part.

### Steps to reproduce

As @cloveras pointed out:
Using December 31 1999 as the date of birth (YYYYMMDD):
ssn('19991231','M')

This results in SSNs like these:
99123145123
99123108724
99123127532

### Expected behavior

The correct format is DDMMYY.

### Actual behavior

These start with the date of birth in YYMMDD format.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `faker/providers/ssn/no_NO/__init__.py`
Content:
```
1 # coding=utf-8
2 
3 from __future__ import unicode_literals
4 from .. import Provider as SsnProvider
5 import datetime
6 import operator
7 
8 
9 def checksum(digits, scale):
10     """
11     Calculate checksum of Norwegian personal identity code.
12 
13     Checksum is calculated with "Module 11" method using a scale.
14     The digits of the personal code are multiplied by the corresponding
15     number in the scale and summed;
16     if remainder of module 11 of the sum is less than 10, checksum is the
17     remainder.
18     If remainder is 0, the checksum is 0.
19 
20     https://no.wikipedia.org/wiki/F%C3%B8dselsnummer
21     """
22     chk_nbr = 11 - (sum(map(operator.mul, digits, scale)) % 11)
23     if chk_nbr == 11:
24         return 0
25     return chk_nbr
26 
27 
28 class Provider(SsnProvider):
29     scale1 = (3, 7, 6, 1, 8, 9, 4, 5, 2)
30     scale2 = (5, 4, 3, 2, 7, 6, 5, 4, 3, 2)
31 
32     def ssn(self, dob=None, gender=None):
33         """
34         Returns 11 character Norwegian personal identity code (Fødselsnummer).
35 
36         A Norwegian personal identity code consists of 11 digits, without any
37         whitespace or other delimiters. The form is DDMMYYIIICC, where III is
38         a serial number separating persons born oh the same date with different
39         intervals depending on the year they are born. CC is two checksums.
40         https://en.wikipedia.org/wiki/National_identification_number#Norway
41 
42         :param dob: date of birth as a "YYYYMMDD" string
43         :type dob: str
44         :param gender: gender of the person - "F" for female, M for male.
45         :type gender: str
46         :return: Fødselsnummer in str format (11 digs)
47         :rtype: str
48         """
49 
50         if dob:
51             birthday = datetime.datetime.strptime(dob, '%Y%m%d')
52         else:
53             age = datetime.timedelta(
54                 days=self.generator.random.randrange(18 * 365, 90 * 365))
55             birthday = datetime.datetime.now() - age
56         if not gender:
57             gender = self.generator.random.choice(('F', 'M'))
58         elif gender not in ('F', 'M'):
59             raise ValueError('Gender must be one of F or M.')
60 
61         while True:
62             if birthday.year >= 1900 and birthday.year <= 1999:
63                 suffix = str(self.generator.random.randrange(0, 49))
64             elif birthday.year >= 1854 and birthday.year <= 1899:
65                 suffix = str(self.generator.random.randrange(50, 74))
66             elif birthday.year >= 2000 and birthday.year <= 2039:
67                 suffix = str(self.generator.random.randrange(50, 99))
68             elif birthday.year >= 1940 and birthday.year <= 1999:
69                 suffix = str(self.generator.random.randrange(90, 99))
70             if gender == 'F':
71                 gender_num = self.generator.random.choice((0, 2, 4, 6, 8))
72             elif gender == 'M':
73                 gender_num = self.generator.random.choice((1, 3, 5, 7, 9))
74             pnr = birthday.strftime('%y%m%d') + suffix.zfill(2) + str(gender_num)
75             pnr_nums = [int(ch) for ch in pnr]
76             k1 = checksum(Provider.scale1, pnr_nums)
77             k2 = checksum(Provider.scale2, pnr_nums + [k1])
78             # Checksums with a value of 10 is rejected.
79             # https://no.wikipedia.org/wiki/F%C3%B8dselsnummer
80             if k1 == 10 or k2 == 10:
81                 continue
82             pnr += '{}{}'.format(k1, k2)
83             return pnr
84
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/faker/providers/ssn/no_NO/__init__.py b/faker/providers/ssn/no_NO/__init__.py
--- a/faker/providers/ssn/no_NO/__init__.py
+++ b/faker/providers/ssn/no_NO/__init__.py
@@ -71,7 +71,7 @@
                 gender_num = self.generator.random.choice((0, 2, 4, 6, 8))
             elif gender == 'M':
                 gender_num = self.generator.random.choice((1, 3, 5, 7, 9))
-            pnr = birthday.strftime('%y%m%d') + suffix.zfill(2) + str(gender_num)
+            pnr = birthday.strftime('%d%m%y') + suffix.zfill(2) + str(gender_num)
             pnr_nums = [int(ch) for ch in pnr]
             k1 = checksum(Provider.scale1, pnr_nums)
             k2 = checksum(Provider.scale2, pnr_nums + [k1])

{"golden_diff": "diff --git a/faker/providers/ssn/no_NO/__init__.py b/faker/providers/ssn/no_NO/__init__.py\n--- a/faker/providers/ssn/no_NO/__init__.py\n+++ b/faker/providers/ssn/no_NO/__init__.py\n@@ -71,7 +71,7 @@\n                 gender_num = self.generator.random.choice((0, 2, 4, 6, 8))\n             elif gender == 'M':\n                 gender_num = self.generator.random.choice((1, 3, 5, 7, 9))\n-            pnr = birthday.strftime('%y%m%d') + suffix.zfill(2) + str(gender_num)\n+            pnr = birthday.strftime('%d%m%y') + suffix.zfill(2) + str(gender_num)\n             pnr_nums = [int(ch) for ch in pnr]\n             k1 = checksum(Provider.scale1, pnr_nums)\n             k2 = checksum(Provider.scale2, pnr_nums + [k1])\n", "issue": "Norwegian ssn returns the wrong format for the date part \nSSN for no_NO returns the wrong format of the date part.\r\n\r\n### Steps to reproduce\r\n\r\nAs @cloveras pointed out:\r\nUsing December 31 1999 as the date of birth (YYYYMMDD):\r\nssn('19991231','M')\r\n\r\nThis results in SSNs like these:\r\n99123145123\r\n99123108724\r\n99123127532\r\n\r\n### Expected behavior\r\n\r\nThe correct format is DDMMYY.\r\n\r\n### Actual behavior\r\n\r\nThese start with the date of birth in YYMMDD format.\r\n\n", "before_files": [{"content": "# coding=utf-8\n\nfrom __future__ import unicode_literals\nfrom .. import Provider as SsnProvider\nimport datetime\nimport operator\n\n\ndef checksum(digits, scale):\n    \"\"\"\n    Calculate checksum of Norwegian personal identity code.\n\n    Checksum is calculated with \"Module 11\" method using a scale.\n    The digits of the personal code are multiplied by the corresponding\n    number in the scale and summed;\n    if remainder of module 11 of the sum is less than 10, checksum is the\n    remainder.\n    If remainder is 0, the checksum is 0.\n\n    https://no.wikipedia.org/wiki/F%C3%B8dselsnummer\n    \"\"\"\n    chk_nbr = 11 - (sum(map(operator.mul, digits, scale)) % 11)\n    if chk_nbr == 11:\n        return 0\n    return chk_nbr\n\n\nclass Provider(SsnProvider):\n    scale1 = (3, 7, 6, 1, 8, 9, 4, 5, 2)\n    scale2 = (5, 4, 3, 2, 7, 6, 5, 4, 3, 2)\n\n    def ssn(self, dob=None, gender=None):\n        \"\"\"\n        Returns 11 character Norwegian personal identity code (F\u00f8dselsnummer).\n\n        A Norwegian personal identity code consists of 11 digits, without any\n        whitespace or other delimiters. The form is DDMMYYIIICC, where III is\n        a serial number separating persons born oh the same date with different\n        intervals depending on the year they are born. CC is two checksums.\n        https://en.wikipedia.org/wiki/National_identification_number#Norway\n\n        :param dob: date of birth as a \"YYYYMMDD\" string\n        :type dob: str\n        :param gender: gender of the person - \"F\" for female, M for male.\n        :type gender: str\n        :return: F\u00f8dselsnummer in str format (11 digs)\n        :rtype: str\n        \"\"\"\n\n        if dob:\n            birthday = datetime.datetime.strptime(dob, '%Y%m%d')\n        else:\n            age = datetime.timedelta(\n                days=self.generator.random.randrange(18 * 365, 90 * 365))\n            birthday = datetime.datetime.now() - age\n        if not gender:\n            gender = self.generator.random.choice(('F', 'M'))\n        elif gender not in ('F', 'M'):\n            raise ValueError('Gender must be one of F or M.')\n\n        while True:\n            if birthday.year >= 1900 and birthday.year <= 1999:\n                suffix = str(self.generator.random.randrange(0, 49))\n            elif birthday.year >= 1854 and birthday.year <= 1899:\n                suffix = str(self.generator.random.randrange(50, 74))\n            elif birthday.year >= 2000 and birthday.year <= 2039:\n                suffix = str(self.generator.random.randrange(50, 99))\n            elif birthday.year >= 1940 and birthday.year <= 1999:\n                suffix = str(self.generator.random.randrange(90, 99))\n            if gender == 'F':\n                gender_num = self.generator.random.choice((0, 2, 4, 6, 8))\n            elif gender == 'M':\n                gender_num = self.generator.random.choice((1, 3, 5, 7, 9))\n            pnr = birthday.strftime('%y%m%d') + suffix.zfill(2) + str(gender_num)\n            pnr_nums = [int(ch) for ch in pnr]\n            k1 = checksum(Provider.scale1, pnr_nums)\n            k2 = checksum(Provider.scale2, pnr_nums + [k1])\n            # Checksums with a value of 10 is rejected.\n            # https://no.wikipedia.org/wiki/F%C3%B8dselsnummer\n            if k1 == 10 or k2 == 10:\n                continue\n            pnr += '{}{}'.format(k1, k2)\n            return pnr\n", "path": "faker/providers/ssn/no_NO/__init__.py"}], "after_files": [{"content": "# coding=utf-8\n\nfrom __future__ import unicode_literals\nfrom .. import Provider as SsnProvider\nimport datetime\nimport operator\n\n\ndef checksum(digits, scale):\n    \"\"\"\n    Calculate checksum of Norwegian personal identity code.\n\n    Checksum is calculated with \"Module 11\" method using a scale.\n    The digits of the personal code are multiplied by the corresponding\n    number in the scale and summed;\n    if remainder of module 11 of the sum is less than 10, checksum is the\n    remainder.\n    If remainder is 0, the checksum is 0.\n\n    https://no.wikipedia.org/wiki/F%C3%B8dselsnummer\n    \"\"\"\n    chk_nbr = 11 - (sum(map(operator.mul, digits, scale)) % 11)\n    if chk_nbr == 11:\n        return 0\n    return chk_nbr\n\n\nclass Provider(SsnProvider):\n    scale1 = (3, 7, 6, 1, 8, 9, 4, 5, 2)\n    scale2 = (5, 4, 3, 2, 7, 6, 5, 4, 3, 2)\n\n    def ssn(self, dob=None, gender=None):\n        \"\"\"\n        Returns 11 character Norwegian personal identity code (F\u00f8dselsnummer).\n\n        A Norwegian personal identity code consists of 11 digits, without any\n        whitespace or other delimiters. The form is DDMMYYIIICC, where III is\n        a serial number separating persons born oh the same date with different\n        intervals depending on the year they are born. CC is two checksums.\n        https://en.wikipedia.org/wiki/National_identification_number#Norway\n\n        :param dob: date of birth as a \"YYYYMMDD\" string\n        :type dob: str\n        :param gender: gender of the person - \"F\" for female, M for male.\n        :type gender: str\n        :return: F\u00f8dselsnummer in str format (11 digs)\n        :rtype: str\n        \"\"\"\n\n        if dob:\n            birthday = datetime.datetime.strptime(dob, '%Y%m%d')\n        else:\n            age = datetime.timedelta(\n                days=self.generator.random.randrange(18 * 365, 90 * 365))\n            birthday = datetime.datetime.now() - age\n        if not gender:\n            gender = self.generator.random.choice(('F', 'M'))\n        elif gender not in ('F', 'M'):\n            raise ValueError('Gender must be one of F or M.')\n\n        while True:\n            if birthday.year >= 1900 and birthday.year <= 1999:\n                suffix = str(self.generator.random.randrange(0, 49))\n            elif birthday.year >= 1854 and birthday.year <= 1899:\n                suffix = str(self.generator.random.randrange(50, 74))\n            elif birthday.year >= 2000 and birthday.year <= 2039:\n                suffix = str(self.generator.random.randrange(50, 99))\n            elif birthday.year >= 1940 and birthday.year <= 1999:\n                suffix = str(self.generator.random.randrange(90, 99))\n            if gender == 'F':\n                gender_num = self.generator.random.choice((0, 2, 4, 6, 8))\n            elif gender == 'M':\n                gender_num = self.generator.random.choice((1, 3, 5, 7, 9))\n            pnr = birthday.strftime('%d%m%y') + suffix.zfill(2) + str(gender_num)\n            pnr_nums = [int(ch) for ch in pnr]\n            k1 = checksum(Provider.scale1, pnr_nums)\n            k2 = checksum(Provider.scale2, pnr_nums + [k1])\n            # Checksums with a value of 10 is rejected.\n            # https://no.wikipedia.org/wiki/F%C3%B8dselsnummer\n            if k1 == 10 or k2 == 10:\n                continue\n            pnr += '{}{}'.format(k1, k2)\n            return pnr\n", "path": "faker/providers/ssn/no_NO/__init__.py"}]}