HEX
Server: Apache
System: Linux WWW 6.1.0-40-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.153-1 (2025-09-20) x86_64
User: web11 (1011)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /var/www/apklausos/application/core/plugins/dateFunctions/dateFunctions.php
<?php

class dateFunctions extends PluginBase
{
    protected static $description = 'Core: Date related Expression Manager functions';
    protected static $name = 'dateFunctions';

    public function init()
    {
        $this->subscribe('ExpressionManagerStart');
    }

    public function ExpressionManagerStart()
    {
        Yii::setPathOfAlias(get_class($this), dirname(__FILE__));
        $newFunctions = array(
            'localize_date' => array(
                '\dateFunctions\EMFunctions::localize_date',
                null, // No javascript function : set as static function
                $this->gT("Formats a date according to the Survey's date format for the specified language. Example: localize_date(VALIDUNTIL, TOKEN:LANGUAGE)"), // Description for admin
                'string localize_date(date [, language])', // Extra description
                'https://www.limesurvey.org/manual/', // Help url
                1, 2 // Number of arguments : 1 or 2 (language is optional)
            )
        );
        $this->getEvent()->append('functions', $newFunctions);

        /**
         * TODO: Update the manual URL
         */
    }
}