Stefan: That is indeed a Mojolicious template. What I meant is that I want to provide a pretty absolute time (not like the ironman webpage) and then I replace that on the client side with whatever "data-timestamp" holds. time() = something computers (javascript) can understand and pretty_absolute_time() is something humans can read.
Another thing is that pretty_absolute_time() makes also more sense if you plan to print the webpage. Therefor I wouldn't replace the <span> tag, but rather hide it by default on "media screen" and show it on "media print". On Thursday, August 28, 2014 2:49:44 PM UTC+2, Stefan Adams wrote: > > > On Thu, Aug 28, 2014 at 7:32 AM, Jan Henning Thorsen < > [email protected]> wrote: > >> Something like this: >> >> <span data-timestamp="<%= time %>" class="timestamp><%= >> pretty_absolute_time %></span> >> > > Are you saying that is on the client side? But that's a Mojolicious > template and therefore rendered on the server site, yes? Isn't > pretty_absolute_time a Perl function in this case? > > -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/d/optout.
