How do I grab the Kohana Jelly Timestamp pretty_format
I was wondering if anyone with some Jelly experience would happen know how one would开发者_StackOverflow中文版 go about grabbing the pretty_format version of a Timestamp out of a Jelly_Field_Timestamp?
I wouldn't mind doing date($pretty_format, $value) as long as I could somehow get that $pretty_format value as I'm looping through my records.
$tasks = Jelly::select('task')->execute();
foreach ($tasks as $task)
{
$task->time;
#??? $task->time->pretty_format;
#??? date($pretty_format, $task->time)
}
Something like this has to be possible... is it not?
Iirc, this is one way to do it:
$time_prettyformat = Jelly::builder('task')->fields('time')->pretty_format;
Another would be:
$task->meta()->fields('time')->pretty_format;
Note, this method only works in 0.9.x versions of Jelly.
精彩评论