Search

So, seems i figured with this four hours :) i'll add add:date function to time-ago-friendly utility:

....
<xsl:variable name="now" select="date:add(concat($today, 'T', $current-time, ':00'),'-PT4H')" />
<xsl:variable name="minutes" select="date:seconds(date:difference($date-and-time, $now)) div 60" />
<xsl:variable name="delta-minutes" select="math:abs($minutes)" />
...

Time show is correctly, but with many many numbers after dot (e.g. 27.5666666666667 minutes ago)

UPD: I don't know whether it is right, i rounded minutes variable:

<xsl:variable name="minutes" select="round(date:seconds(date:difference($date-and-time, $now)) div 60)" />

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details