Changing datetime formatting from |format to .stftime()
authorChristopher Allan Webber <cwebber@dustycloud.org>
Sat, 20 Aug 2011 14:04:21 +0000 (09:04 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Sat, 20 Aug 2011 14:04:21 +0000 (09:04 -0500)
mediagoblin/templates/mediagoblin/user_pages/media.html

index 089c4c239e0fe0273e8fe7332e1fc5032ecb2c83..2086d3d60f9b53692518f3fc4e2cbe54af9969ac 100644 (file)
@@ -34,9 +34,7 @@
       </h2>
 
       <p class="media_uploader">
-        {% trans date="%4d-%02d-%02d"|format(
-                   media.created.year,
-                   media.created.month, media.created.day),
+        {% trans date=media.created.strftime("%Y-%m-%d"),
                  user_url=request.urlgen(
                    'mediagoblin.user_pages.user_home',
                    user=media.uploader().username),
                       comment = comment['_id'],
                       user = media.uploader().username,
                       media = media._id) }}#comment">
-                {{ "%4d-%02d-%02d %02d:%02d"|format(comment.created.year,
-                                         comment.created.month,
-                                         comment.created.day,
-                                         comment.created.hour,
-                                         comment.created.minute) }}
+                {{ comment.created.strftime("%Y-%m-%d %I:%M%p") }}
               </a>
             </div>
           </div>