We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Exploration Cards Show "Invalid date" as date
**Describe the bug**
In the library, exploration cards have `Invalid date` in the lower right-hand corner.

**To Reproduce**
Steps to reproduce the behavior:
 1. Go to https://oppiatestserver.appspot.com/library

**Observed behavior**
The exploration cards show `Invalid date`

**Expected behavior**
The cards should show the creation date.

**Screenshots**

![Screen Shot 2019-11-10 at 17 41 34](https://user-images.githubusercontent.com/19878639/68556295-7c3dae80-03e6-11ea-950c-21829cb7d26e.png)

**Desktop (please complete the following information; delete this section if the issue does not arise on desktop):**
 - OS: macOS
 - Browser: Firefox
 - Version: 2.8.7
Publish change button has overflowing text
**Describe the bug**
Publish change text while publishing a collection moves out of the button box.

**To Reproduce**
Steps to reproduce the behavior:
 1. Create a collection and check the publish button. The text moves out of the button box.

**Screenshots**
<img width="1440" alt="Screenshot 2019-11-14 at 12 35 14 AM" src="https://user-images.githubusercontent.com/15226041/68795290-a9a08b80-0676-11ea-8b46-57b6b68c3077.png">


**Desktop (please complete the following information; delete this section if the issue does not arise on desktop):**
 - OS: Mac
 - Browser: Chrome



--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `scripts/typescript_checks.py`
Content:
```
1 # Copyright 2019 The Oppia Authors. All Rights Reserved.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #      http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS-IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 
15 """File for compiling and checking typescript."""
16 from __future__ import absolute_import  # pylint: disable=import-only-modules
17 from __future__ import unicode_literals  # pylint: disable=import-only-modules
18 
19 import json
20 import os
21 import shutil
22 import subprocess
23 import sys
24 
25 import python_utils
26 
27 COMPILED_JS_DIR = os.path.join('local_compiled_js_for_test', '')
28 TSCONFIG_FILEPATH = 'tsconfig-for-compile-check.json'
29 
30 
31 def validate_compiled_js_dir():
32     """Validates that compiled js dir matches out dir in tsconfig."""
33     with python_utils.open_file(TSCONFIG_FILEPATH, 'r') as f:
34         config_data = json.load(f)
35         out_dir = os.path.join(config_data['compilerOptions']['outDir'], '')
36     if out_dir != COMPILED_JS_DIR:
37         raise Exception(
38             'COMPILED_JS_DIR: %s does not match the output directory '
39             'in %s: %s' % (COMPILED_JS_DIR, TSCONFIG_FILEPATH, out_dir))
40 
41 
42 def compile_and_check_typescript():
43     """Compiles typescript files and checks the compilation errors."""
44     node_path = os.path.join(os.pardir, 'oppia_tools/node-10.15.3')
45     os.environ['PATH'] = '%s/bin:' % node_path + os.environ['PATH']
46 
47     validate_compiled_js_dir()
48 
49     if os.path.exists(COMPILED_JS_DIR):
50         shutil.rmtree(COMPILED_JS_DIR)
51 
52     python_utils.PRINT('Compiling and testing typescript...')
53     cmd = [
54         './node_modules/typescript/bin/tsc', '--project',
55         TSCONFIG_FILEPATH]
56     process = subprocess.Popen(cmd, stdout=subprocess.PIPE)
57     if os.path.exists(COMPILED_JS_DIR):
58         shutil.rmtree(COMPILED_JS_DIR)
59     error_messages = []
60     for line in iter(process.stdout.readline, ''):
61         error_messages.append(line)
62     if error_messages:
63         python_utils.PRINT('Errors found during compilation\n')
64         for message in error_messages:
65             python_utils.PRINT(message)
66         sys.exit(1)
67     else:
68         python_utils.PRINT('Compilation successful!')
69 
70 
71 # The 'no coverage' pragma is used as this line is un-testable. This is because
72 # it will only be called when typescript_checks.py is used as a script.
73 if __name__ == '__main__':  # pragma: no cover
74     compile_and_check_typescript()
75
```
--- 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/scripts/typescript_checks.py b/scripts/typescript_checks.py
--- a/scripts/typescript_checks.py
+++ b/scripts/typescript_checks.py
@@ -54,11 +54,11 @@
         './node_modules/typescript/bin/tsc', '--project',
         TSCONFIG_FILEPATH]
     process = subprocess.Popen(cmd, stdout=subprocess.PIPE)
-    if os.path.exists(COMPILED_JS_DIR):
-        shutil.rmtree(COMPILED_JS_DIR)
     error_messages = []
     for line in iter(process.stdout.readline, ''):
         error_messages.append(line)
+    if os.path.exists(COMPILED_JS_DIR):
+        shutil.rmtree(COMPILED_JS_DIR)
     if error_messages:
         python_utils.PRINT('Errors found during compilation\n')
         for message in error_messages:

{"golden_diff": "diff --git a/scripts/typescript_checks.py b/scripts/typescript_checks.py\n--- a/scripts/typescript_checks.py\n+++ b/scripts/typescript_checks.py\n@@ -54,11 +54,11 @@\n         './node_modules/typescript/bin/tsc', '--project',\n         TSCONFIG_FILEPATH]\n     process = subprocess.Popen(cmd, stdout=subprocess.PIPE)\n-    if os.path.exists(COMPILED_JS_DIR):\n-        shutil.rmtree(COMPILED_JS_DIR)\n     error_messages = []\n     for line in iter(process.stdout.readline, ''):\n         error_messages.append(line)\n+    if os.path.exists(COMPILED_JS_DIR):\n+        shutil.rmtree(COMPILED_JS_DIR)\n     if error_messages:\n         python_utils.PRINT('Errors found during compilation\\n')\n         for message in error_messages:\n", "issue": "Exploration Cards Show \"Invalid date\" as date\n**Describe the bug**\r\nIn the library, exploration cards have `Invalid date` in the lower right-hand corner.\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n 1. Go to https://oppiatestserver.appspot.com/library\r\n\r\n**Observed behavior**\r\nThe exploration cards show `Invalid date`\r\n\r\n**Expected behavior**\r\nThe cards should show the creation date.\r\n\r\n**Screenshots**\r\n\r\n![Screen Shot 2019-11-10 at 17 41 34](https://user-images.githubusercontent.com/19878639/68556295-7c3dae80-03e6-11ea-950c-21829cb7d26e.png)\r\n\r\n**Desktop (please complete the following information; delete this section if the issue does not arise on desktop):**\r\n - OS: macOS\r\n - Browser: Firefox\r\n - Version: 2.8.7\nPublish change button has overflowing text\n**Describe the bug**\r\nPublish change text while publishing a collection moves out of the button box.\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n 1. Create a collection and check the publish button. The text moves out of the button box.\r\n\r\n**Screenshots**\r\n<img width=\"1440\" alt=\"Screenshot 2019-11-14 at 12 35 14 AM\" src=\"https://user-images.githubusercontent.com/15226041/68795290-a9a08b80-0676-11ea-8b46-57b6b68c3077.png\">\r\n\r\n\r\n**Desktop (please complete the following information; delete this section if the issue does not arise on desktop):**\r\n - OS: Mac\r\n - Browser: Chrome\r\n\r\n\n", "before_files": [{"content": "# Copyright 2019 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS-IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\"\"\"File for compiling and checking typescript.\"\"\"\nfrom __future__ import absolute_import  # pylint: disable=import-only-modules\nfrom __future__ import unicode_literals  # pylint: disable=import-only-modules\n\nimport json\nimport os\nimport shutil\nimport subprocess\nimport sys\n\nimport python_utils\n\nCOMPILED_JS_DIR = os.path.join('local_compiled_js_for_test', '')\nTSCONFIG_FILEPATH = 'tsconfig-for-compile-check.json'\n\n\ndef validate_compiled_js_dir():\n    \"\"\"Validates that compiled js dir matches out dir in tsconfig.\"\"\"\n    with python_utils.open_file(TSCONFIG_FILEPATH, 'r') as f:\n        config_data = json.load(f)\n        out_dir = os.path.join(config_data['compilerOptions']['outDir'], '')\n    if out_dir != COMPILED_JS_DIR:\n        raise Exception(\n            'COMPILED_JS_DIR: %s does not match the output directory '\n            'in %s: %s' % (COMPILED_JS_DIR, TSCONFIG_FILEPATH, out_dir))\n\n\ndef compile_and_check_typescript():\n    \"\"\"Compiles typescript files and checks the compilation errors.\"\"\"\n    node_path = os.path.join(os.pardir, 'oppia_tools/node-10.15.3')\n    os.environ['PATH'] = '%s/bin:' % node_path + os.environ['PATH']\n\n    validate_compiled_js_dir()\n\n    if os.path.exists(COMPILED_JS_DIR):\n        shutil.rmtree(COMPILED_JS_DIR)\n\n    python_utils.PRINT('Compiling and testing typescript...')\n    cmd = [\n        './node_modules/typescript/bin/tsc', '--project',\n        TSCONFIG_FILEPATH]\n    process = subprocess.Popen(cmd, stdout=subprocess.PIPE)\n    if os.path.exists(COMPILED_JS_DIR):\n        shutil.rmtree(COMPILED_JS_DIR)\n    error_messages = []\n    for line in iter(process.stdout.readline, ''):\n        error_messages.append(line)\n    if error_messages:\n        python_utils.PRINT('Errors found during compilation\\n')\n        for message in error_messages:\n            python_utils.PRINT(message)\n        sys.exit(1)\n    else:\n        python_utils.PRINT('Compilation successful!')\n\n\n# The 'no coverage' pragma is used as this line is un-testable. This is because\n# it will only be called when typescript_checks.py is used as a script.\nif __name__ == '__main__':  # pragma: no cover\n    compile_and_check_typescript()\n", "path": "scripts/typescript_checks.py"}], "after_files": [{"content": "# Copyright 2019 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS-IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\"\"\"File for compiling and checking typescript.\"\"\"\nfrom __future__ import absolute_import  # pylint: disable=import-only-modules\nfrom __future__ import unicode_literals  # pylint: disable=import-only-modules\n\nimport json\nimport os\nimport shutil\nimport subprocess\nimport sys\n\nimport python_utils\n\nCOMPILED_JS_DIR = os.path.join('local_compiled_js_for_test', '')\nTSCONFIG_FILEPATH = 'tsconfig-for-compile-check.json'\n\n\ndef validate_compiled_js_dir():\n    \"\"\"Validates that compiled js dir matches out dir in tsconfig.\"\"\"\n    with python_utils.open_file(TSCONFIG_FILEPATH, 'r') as f:\n        config_data = json.load(f)\n        out_dir = os.path.join(config_data['compilerOptions']['outDir'], '')\n    if out_dir != COMPILED_JS_DIR:\n        raise Exception(\n            'COMPILED_JS_DIR: %s does not match the output directory '\n            'in %s: %s' % (COMPILED_JS_DIR, TSCONFIG_FILEPATH, out_dir))\n\n\ndef compile_and_check_typescript():\n    \"\"\"Compiles typescript files and checks the compilation errors.\"\"\"\n    node_path = os.path.join(os.pardir, 'oppia_tools/node-10.15.3')\n    os.environ['PATH'] = '%s/bin:' % node_path + os.environ['PATH']\n\n    validate_compiled_js_dir()\n\n    if os.path.exists(COMPILED_JS_DIR):\n        shutil.rmtree(COMPILED_JS_DIR)\n\n    python_utils.PRINT('Compiling and testing typescript...')\n    cmd = [\n        './node_modules/typescript/bin/tsc', '--project',\n        TSCONFIG_FILEPATH]\n    process = subprocess.Popen(cmd, stdout=subprocess.PIPE)\n    error_messages = []\n    for line in iter(process.stdout.readline, ''):\n        error_messages.append(line)\n    if os.path.exists(COMPILED_JS_DIR):\n        shutil.rmtree(COMPILED_JS_DIR)\n    if error_messages:\n        python_utils.PRINT('Errors found during compilation\\n')\n        for message in error_messages:\n            python_utils.PRINT(message)\n        sys.exit(1)\n    else:\n        python_utils.PRINT('Compilation successful!')\n\n\n# The 'no coverage' pragma is used as this line is un-testable. This is because\n# it will only be called when typescript_checks.py is used as a script.\nif __name__ == '__main__':  # pragma: no cover\n    compile_and_check_typescript()\n", "path": "scripts/typescript_checks.py"}]}