Show More
@@ -18,6 +18,7 b' from __future__ import print_function, absolute_import' | |||
|
18 | 18 | |
|
19 | 19 | # Stdlib imports |
|
20 | 20 | import os.path |
|
21 | import sys | |
|
21 | 22 | |
|
22 | 23 | # Used to set the default date to today's date |
|
23 | 24 | from datetime import date |
@@ -157,7 +158,10 b' class SphinxPreprocessor(Preprocessor):' | |||
|
157 | 158 | if self.publish_date: |
|
158 | 159 | resources["sphinx"]["date"] = self.publish_date |
|
159 | 160 | elif len(resources['metadata']['modified_date'].strip()) == 0: |
|
160 | resources["sphinx"]["date"] = date.today().strftime("%B %d, %Y") | |
|
161 | if sys.platform == 'win32': | |
|
162 | resources["sphinx"]["date"] = date.today().strftime("%B %d, %Y") | |
|
163 | else: | |
|
164 | resources["sphinx"]["date"] = date.today().strftime("%B %-d, %Y") | |
|
161 | 165 | else: |
|
162 | 166 | resources["sphinx"]["date"] = resources['metadata']['modified_date'] |
|
163 | 167 | |
@@ -219,7 +223,10 b' class SphinxPreprocessor(Preprocessor):' | |||
|
219 | 223 | if resources['metadata']['modified_date']: |
|
220 | 224 | default_date = resources['metadata']['modified_date'] |
|
221 | 225 | else: |
|
222 | default_date = date.today().strftime("%B %-d, %Y") | |
|
226 | if sys.platform == 'win32': | |
|
227 | default_date = date.today().strftime("%B %d, %Y") | |
|
228 | else: | |
|
229 | default_date = date.today().strftime("%B %-d, %Y") | |
|
223 | 230 | |
|
224 | 231 | user_date = console.input("Date (deafults to \"" + default_date + "\"): ") |
|
225 | 232 | if len(user_date.strip()) == 0: |
@@ -261,4 +268,3 b' class SphinxPreprocessor(Preprocessor):' | |||
|
261 | 268 | 6: "(for international documents)"} |
|
262 | 269 | |
|
263 | 270 | return console.prompt_dictionary(styles, menu_comments=comments) |
|
264 |
General Comments 0
You need to be logged in to leave comments.
Login now