Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+4 votes
706 views
in Q2A Core by
Hi. I was wondering how can i change the format of the date a Question is created? Right now it use this format mm/dd/YYYY. Is it posible to display the date as: dd/mm/YYYY ??

e.g 20 March 2017 instead of March 20 2017
Q2A version: 1.7.4
by
Any idea ? @scott, @sama55 ??

1 Answer

+5 votes
by
selected by
 
Best answer

Create custom language file below. The language data in qa-include/lang is overwritten by language data in the custom folder.

qa-lang/custom/qa-lang-main.php

<?php
    return array(
        'date_day_min_digits' => 1, // 1 or 2
        //'date_format_other_years' => '^month ^day, ^year',
        'date_format_other_years' => '^day ^month, ^year',
        //'date_format_this_year' => '^month ^day',
        'date_format_this_year' => '^day ^month',
        'date_month_1' => 'Jan',
        'date_month_2' => 'Feb',
        'date_month_3' => 'Mar',
        'date_month_4' => 'Apr',
        'date_month_5' => 'May',
        'date_month_6' => 'Jun',
        'date_month_7' => 'Jul',
        'date_month_8' => 'Aug',
        'date_month_9' => 'Sep',
        'date_month_10' => 'Oct',
        'date_month_11' => 'Nov',
        'date_month_12' => 'Dec',
        'date_year_digits' => 4, // 2 or 4
    );

However, I think that there are programs directly using PHP time formatting functions, so all of date formats may not be changed by this.​

by
+1
That worked pretty fine @sama55. Once again thanks for helping!
...