Permalink
Browse files

use the right year arg

%G can give you the wrong year unless the 1st is a monday and therefore
%a new week
  • Loading branch information...
AD7six committed Jan 1, 2012
1 parent 4bf1e19 commit 31e1218edcfffc01daf0dbb61d65d1c009ba17c9
Showing with 4 additions and 4 deletions.
  1. +1 −1 View/Layouts/post.ctp
  2. +1 −1 View/Posts/archives.ctp
  3. +2 −2 View/Posts/home.ctp
View
@@ -6,7 +6,7 @@
<header>
<h1 class="title"><?php echo $title_for_layout ?></h1>
<?php if (!empty($postDate)) { ?>
- <h3 class="date"><?php echo strftime('%e %B, %G', $postDate) ?></h3>
+ <h3 class="date"><?php echo strftime('%e %B, %Y', $postDate) ?></h3>
<?php } ?>
<p class="meta">
</p>
View
@@ -6,6 +6,6 @@ title: All posts
<h1>All articles</h1>
<ul class="posts">
<?php foreach($posts as $post): ?>
- <li><span><?php echo strftime('%d %b, %G', $post['date']) ?></span> » <a href="<?php echo $post['url']?>"><?php echo $post['title'] ?></a></li>
+ <li><span><?php echo strftime('%d %b, %Y', $post['date']) ?></span> » <a href="<?php echo $post['url']?>"><?php echo $post['title'] ?></a></li>
<?php endforeach; ?>
</ul>
View
@@ -7,13 +7,13 @@ description: Latest posts from Somebody
<h2>Title</h2>
<p>Tagline.</p>
<?php $latest = $this->Post->data($latest); ?><h2>Latest: <a href="<?php echo $latest['url'] ?>"><?php echo $latest['title'] ?></a></h2>
- <h3 class="date"><?php echo strftime('%e %b, %G', $latest['date']) ?></h3>
+ <h3 class="date"><?php echo strftime('%e %b, %Y', $latest['date']) ?></h3>
<?php echo $latest['intro'] ?>
<h2>Recent Writing</h2>
<ul class="posts">
<?php foreach($posts as $post): ?>
- <li><span><?php echo strftime('%d %b, %G', $post['date']) ?></span> » <a href="<?php echo $post['url']?>"><?php echo $post['title'] ?></a></li>
+ <li><span><?php echo strftime('%d %b, %Y', $post['date']) ?></span> » <a href="<?php echo $post['url']?>"><?php echo $post['title'] ?></a></li>
<?php endforeach; ?>
<li><a href="/archives.html">All articles</a></li>
</ul>

0 comments on commit 31e1218

Please sign in to comment.