Login or create new account.

By registering on joomprod.com, you will have immediate access to all our free products and to the public side of our support forum.

Enjoy our subscriptions.

Each of our subscriptions allow you to enjoy the private side of the support forum and all the update of our products for a period ranging from 3 months to 1 year.

Payment And immediate download.

After subscribing to one of our subscription, the products are immediately downloadable.

Login

Or Register
Accueil / forum / Public Forum / Main Forum / [RESOLVED] How to displays date in ads details?

Support Availability Because we must sleep sometimes

Working days: Monday to Friday.
Reply time: Depending on the complexity of your support issue it's usually between a few hours to 48 hours.

Support is only guaranteed to paid subscribers

AdsManager - End of life

It is with great regrets that we have chosen to end the developpement of Adsmanager and its other associated components.

AdsManager is born 10 years ago and, as of today, the number of new subscriptions and downloads have fallen and we cannot maintain the component anymore.

All active subscribers will be able to continue enjoying support until the end of their subscription.

The components will be free and no support will be provided anymore for the other users.

×

Notice

The forum is in read only mode.

× OLD Forum post could be checked here : forum.joomprod.com

[RESOLVED] How to displays date in ads details?

More
11 years 3 months ago - 11 years 3 months ago #3066 by tompap
Replied by tompap on topic How to displays date in ads details?
Hello,

I found the trick in joomla libraries. They are using the language files to get the translation of the month, day ,etc...

So best to format the date is:
JHtml::_('date',$this->content->date_created, '%A, %d %B %Y')

Will add that in the future
Last edit: 11 years 3 months ago by tompap.
The following user(s) said Thank You: adarr
  • yaltabest@yandex.ru
  • Topic Author
  • Offline
  • Gold
  • Gold
More
11 years 3 months ago #3070 by yaltabest@yandex.ru
Replied by yaltabest@yandex.ru on topic How to displays date in ads details?

tompap wrote: The problem with setlocale is that your server should have this locale install.
On linux command you can do : locale -a to see all locale installed.

You are able to display date with fullname like: Monday , Thrusday in the order components (com_content ?)


Yes, of course, in com_content templates I set DATE_FORMAT_LC3 and it displays correct - Обновлено 23 Август 2013
K2 displays date correct too - Воскресенье, 05 Январь 2014
Kunena displays

What is the problem with adsmanager?
Why adsmanager don't use native joomla variables for it?

DATE_FORMAT_LC=%d.%m.%Y – 23.02.2011
DATE_FORMAT_LC1=%d.%m.%Y– 23.02.2011
DATE_FORMAT_LC2=%d.%m.%Y %H:%M – 23.02.2011 13:20
DATE_FORMAT_LC3=%d %B %Y – 23 Февраля 2011
DATE_FORMAT_LC4=%d.%m.%y – 23.02.11
The following user(s) said Thank You: adarr
More
11 years 3 months ago #3086 by tompap
Replied by tompap on topic How to displays date in ads details?
We will change all date display to use JHTML date function. Right now we were using the PHP function (adsmanager exists before this function, Joomla 1.0). we didn't have problem without the locale was set to the correct value.

But this is something we will improve in the next version. So you have to change the code with the code I sent you right now to fix your needs
The following user(s) said Thank You: adarr
  • yaltabest@yandex.ru
  • Topic Author
  • Offline
  • Gold
  • Gold
More
11 years 3 months ago - 11 years 3 months ago #3089 by yaltabest@yandex.ru
Replied by yaltabest@yandex.ru on topic How to displays date in ads details?

tompap wrote: So you have to change the code with the code I sent you right now to fix your needs


Thanks! You already sent me code?
Last edit: 11 years 3 months ago by yaltabest@yandex.ru.
The following user(s) said Thank You: adarr
More
11 years 3 months ago #3103 by tompap
Replied by tompap on topic How to displays date in ads details?
Yes:

JHtml::_('date',$this->content->date_created, '%A, %d %B %Y')
The following user(s) said Thank You: adarr
  • yaltabest@yandex.ru
  • Topic Author
  • Offline
  • Gold
  • Gold
More
11 years 3 months ago #3104 by yaltabest@yandex.ru
Replied by yaltabest@yandex.ru on topic How to displays date in ads details?
Ok, thanks, this code work fine:
<?php echo JHtml::_('date',$this->content->date_created, ' d M Y'); ?>

I don't know why, but no needed % in parameters.

Fixed ))
The following user(s) said Thank You: adarr
Moderators: perry
Time to create page: 0.154 seconds
Powered by Kunena Forum