When using $post->pubdate_out in a theme I can change the date using
filter_post_pubdate_out but it seems like the filter is run to early.
In my opinion the filter is the last thing that should be run letting
you do anything you want with the output. Using the code bellow along
with <?php echo $post->pubdate_out; ?> will generate an error:

"<b>Warning:</b> DateTime::__construct() [<a href='function.DateTime---
construct'>function.DateTime---construct</a>]: Failed to parse time
string (test) at position 0 (t): The timezone could not be found in
the database in system/classes/habaridatetime.php line 106"

/*
* Filter the date
*/
public function filter_post_pubdate_out($out, $post)
{
        return "test";
}

If you instead use <?php $post->pubdate->out(); ?> the filter wont
work. Nor will Format::apply('nice_date', 'post_pubdate_out', 'F j,
Y'); work.

So what's the right way of doing this? Or is this just not working
right now? It seems like some plugin hooks and formats should be added
to the HabariDateTime class.
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/habari-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to