Skip to content
This repository has been archived by the owner on Apr 5, 2019. It is now read-only.

Commit

Permalink
Localise date formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Barnaby Gray committed Jul 27, 2010
1 parent 9416b7b commit 5a944ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion static/js/common.js
Expand Up @@ -253,7 +253,7 @@ stashboard.fillIndex = function() {
for (var i=0; i < 5; i++) {
$("<th />", {
"class": "date",
text: (d.getMonth() + 1) + "/" + d.getDate() + "/" + d.getFullYear()
text: d.toLocaleDateString()
}).appendTo(thead);
d = new Date(d.getTime() - 86400000);
}
Expand Down
5 changes: 3 additions & 2 deletions views/default/service.html
Expand Up @@ -40,10 +40,11 @@
<h2><span></span></h2>

<p id="serviceDescription"></p>

{% if start_date %}
<h3 class="date-range">
{{ start_date|date:"n/j/Y" }}
<script type="text/javascript">
document.write(new Date("{{ start_date_stamp }}").toLocaleDateString());
</script>
</h3>
{% endif %}

Expand Down

0 comments on commit 5a944ed

Please sign in to comment.