Editing Page Added Date or Fixing Date Published Date

Permalink
I need some help. I've built a custom template for the page block that I need to show the published dates for posts created in the Blog.

I need the date to appear in two areas, one for the month, and one for the day. I added the code:

<p class="ccm-publisher-page-list-month"><?php echo $cobj->getCollectionDateAdded('F'); ?></p>
<p class="ccm-publisher-page-list-day"><?php echo $cobj->getCollectionDateAdded('d'); ?></p>


Which correctly displays the month and day the page was added, but it's the date the page was created, not the public date. Unfortunately, when I use the code:

<p class="ccm-publisher-page-list-month"><?php echo $cobj->getCollectionDatePublic('F'); ?></p>
<p class="ccm-publisher-page-list-day"><?php echo $cobj->getCollectionDatePublic('d'); ?></p>


It doesn't parse out the month and day correctly, it returns the same date and time string for both (2010-03-21 21:00:00) even though just 'F' and 'd' are required.

So, I either need to know how to change the date added or why my Published Date isn't parsing correctly.

Any ideas?

BeKindRewind
 
ryan replied on at Permalink Reply
ryan
is your cobj an instance of Page, or Collection

in the page class it looks like, even if the versions date public values wasn't set, it'd format the result..
return date($dateFormat, strtotime($this->vObj->cvDatePublic));