Custom Date not working [Solution SEE Tooltip]

More
14 years 3 months ago #19682 by igcorreia
Hey guys, I am trying to use a custom date something like:
Code:
$today = date("D M j G:i:s T Y");
so in the Created date field I put:
Code:
<span class="day-number">%d</span> <span class="month-short-text">%M</span> <span class="year-number">%Y</span>
the problem is that %M does not work.

I am doing something wrong?

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #19683 by ggppdk
I think your post is not related to FLEXIcontent, maybe post in joomla or PHP forums ??? or also search more the web and PHP documentation ???

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #19686 by igcorreia
I didn't make my self clear.
This is what I trying to do:
[attachment=0:2rlbyngq]<!-- ia0 -->bug-date.PNG<!-- ia0 -->[/attachment:2rlbyngq]

The custom string I want is this one:
Code:
<div class="date-flexi-container"> <span class="dia-numero">%A</span> <span class="mes-texto">%M</span> <span class="ano-numero">%Y</span> </div>

the bug is this one the "%M" should be presente as:
Jan Feb Mar May Jun

but is it giving me in the front end:
00
> double zero

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #19690 by ggppdk
Now you are clear. And the image was helpful to see the mistake

I don't know if your translation of tooltip of this parameter (custom format) is correct, but it says to enter text as describe in www.php.net/strftime :

DO NOT ENTER HTML, what you type in there it is given to strftime function.
Enter only the date format, e.g. like:
%Y-%m-%d
will result in
2011-07-21

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #19691 by igcorreia
Can you with %M (CAPITAL M) it does not work.

That what I am trying to SAY.

As you shouwed on the link there is a CAPITAL "M"
for months.
It does not work. Can you try it?

the result is always "00"

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #19694 by ggppdk
I tested in v1.5.6 and it works.

NOTE that a format like : %d/%m/%y %H:%M:%S
will display hours minutes and seconds.
20/11/2011 19:20:55

When you edit the item , and after graphically selecting date (e.g. 2011/11/20) do this:
add a space just after date and write time like this
2011/11/20 19:20:55

Then it should work.

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #19703 by igcorreia
Sorry for my incompetence but from the PHP manual "M" does not represent minutes but MONTHS.
[attachment=1:27pjvsbh]<!-- ia1 -->bug-date-2.PNG<!-- ia1 -->[/attachment:27pjvsbh]

As you can see the M is for Short Monthly names and not for minutes.

I am wrong? I got it to work for now.
[attachment=0:27pjvsbh]<!-- ia0 -->bug-date-3.PNG<!-- ia0 -->[/attachment:27pjvsbh]

But instead of "OCTOBER" I wanted "Oct" :D but this is not really necessary, but I just want to clarify why the "M" is for Minutes and not Months?

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #19704 by ggppdk
Please check this page for available format modifiers:
(your tooltip in field configuration should also state this web address:)
www.php.net/strftime

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #19714 by igcorreia
hehehee :D

it is suppose to be "%b" nice :D

WORKED!! Thanks.

IDIOT OF ME:D JUST NOTICE THE TOOL TIP GRRRRRRRRRRRRRR

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #19742 by ggppdk
mmm at most places , the existing Tool-tips are good. But on other places they need improvement, e.g. by adding examples ..., then of course people that make the translations should update the translations, otherwise the users will never see the new improved tool-tips ...

When you write better on-line tips, then the questions that users will make be fewer, and this is important. :D


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save