[rtems-docs commit] conf.py: Fix build_date() to append correct suffix on all days.
    Joel Sherrill 
    joel at rtems.org
       
    Thu Jan 12 01:26:37 UTC 2017
    
    
  
Module:    rtems-docs
Branch:    master
Commit:    876035b7bde22c769473a651a7d942cee36dd1cb
Changeset: http://git.rtems.org/rtems-docs/commit/?id=876035b7bde22c769473a651a7d942cee36dd1cb
Author:    Justin Powell <mrmoolovesu at gmail.com>
Date:      Wed Jan 11 19:24:46 2017 -0600
conf.py: Fix build_date() to append correct suffix on all days.
---
 common/conf.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/common/conf.py b/common/conf.py
index c4531b9..ce3469f 100644
--- a/common/conf.py
+++ b/common/conf.py
@@ -8,10 +8,16 @@ def build_date():
     now = datetime.date.today()
     m = now.strftime('%b')
     y = now.strftime('%Y')
-    if now.day % 10 == 1:
+    if now.day == 11:
+        s = 'th'
+    elif now.day % 10 == 1:
         s = 'st'
+    elif now.day == 12:
+        s = 'th'
     elif now.day % 10 == 2:
         s = 'nd'
+    elif now.day == 13:
+        s = 'th'
     elif now.day == 3:
         s = 'rd'
     else:
    
    
More information about the vc
mailing list