##// END OF EJS Templates
Fixed missed line, made fix win specific
Jonathan Frederic -
Show More
@@ -18,6 +18,7 b' from __future__ import print_function, absolute_import'
18
18
19 # Stdlib imports
19 # Stdlib imports
20 import os.path
20 import os.path
21 import sys
21
22
22 # Used to set the default date to today's date
23 # Used to set the default date to today's date
23 from datetime import date
24 from datetime import date
@@ -157,7 +158,10 b' class SphinxPreprocessor(Preprocessor):'
157 if self.publish_date:
158 if self.publish_date:
158 resources["sphinx"]["date"] = self.publish_date
159 resources["sphinx"]["date"] = self.publish_date
159 elif len(resources['metadata']['modified_date'].strip()) == 0:
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 else:
165 else:
162 resources["sphinx"]["date"] = resources['metadata']['modified_date']
166 resources["sphinx"]["date"] = resources['metadata']['modified_date']
163
167
@@ -219,7 +223,10 b' class SphinxPreprocessor(Preprocessor):'
219 if resources['metadata']['modified_date']:
223 if resources['metadata']['modified_date']:
220 default_date = resources['metadata']['modified_date']
224 default_date = resources['metadata']['modified_date']
221 else:
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 user_date = console.input("Date (deafults to \"" + default_date + "\"): ")
231 user_date = console.input("Date (deafults to \"" + default_date + "\"): ")
225 if len(user_date.strip()) == 0:
232 if len(user_date.strip()) == 0:
@@ -261,4 +268,3 b' class SphinxPreprocessor(Preprocessor):'
261 6: "(for international documents)"}
268 6: "(for international documents)"}
262
269
263 return console.prompt_dictionary(styles, menu_comments=comments)
270 return console.prompt_dictionary(styles, menu_comments=comments)
264
General Comments 0
You need to be logged in to leave comments. Login now