[soved]change format date displaying

More
14 years 5 days ago #22256 by micker
hello i want to diplay my date in other format ..
actualy i use
Code:
<?php echo $items[$i]->created; ?>
but i want to creat a area with
Code:
day month
same date this link
www.randonnee-nature.com/les-ran ... tenaires-2
on right ...
regards

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

More
14 years 5 days ago #22258 by Rehne
Hi Micker,

perhaps in this way as an example
Code:
$Date = $items[$i]->created; $Date = ( date('Y-n-d', strtotime($Date))); ... ... $event_date = strftime("%A, %d. %B %Y",strtotime($Date));

/** explode event_date > custom date Format must be %A %d.%b %Y **/
Code:
$event_date_array = explode(" ",$event_date);

// $event_date_array[0] = Tag (z.B. Donnerstag)
// $event_date_array[1] = Monat (inkl. Tag) (z.B. 02.Sep)
// $event_date_array[2] = Year (z.B. 2010);
Code:
<span class="event-day"><?php echo $event_date_array[0];?></span> <span class="event-month"><?php echo $event_date_array[1]; ?></span> <span class="event-year"><?php echo $event_date_array[2]; ?></span>

I've done here
www.drumbology.de/termine/item/108-veb-dickehose

Regards

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

More
14 years 5 days ago #22260 by micker
great i test this !
i want to creat same view
www.randonnee-nature.com/les-ran ... tenaires-2
regards

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

More
14 years 4 days ago #22327 by micker
it work !
but i don't understand why it's in english ...

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

More
14 years 4 days ago #22329 by ggppdk
Try this before the formating the date:
Code:
setlocale(LC_ALL, 'fr-FR' );
OR BETTER
Code:
$lang = JRequest::getWord('lang', '' ); if(empty($lang)){ $langFactory= JFactory::getLanguage(); $tagLang = $langFactory->getTag(); } setlocale(LC_ALL, $tagLang );

UPDATE: i have corrected above code and replaced $lang with $tagLang in setlocale(..)

PS: Will be away from forum till Thursday

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 4 days ago #22331 by micker
just some error in éèà ...
my code
Code:
<?php $lang = JRequest::getWord('lang', '' ); if(empty($lang)){ $langFactory= JFactory::getLanguage(); $tagLang = $langFactory->getTag(); } setlocale(LC_ALL, $lang ); $Date = $items[$i]->created; $Date = ( date('Y-n-d', strtotime($Date))); $event_date = strftime("%A %d %B %Y",strtotime($Date)); $event_date_array = explode(" ",$event_date); ?> <div id="date"><span class="event-day"><?php echo $event_date_array[0];?></span> <span class="event-month"><?php echo $event_date_array[1]; ?></span> <span class="event-year"><?php echo $event_date_array[2]; ?></span></div>
thanks for all

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

More
13 years 11 months ago #22427 by micker
nobody
for exemple février -> f#evrier ...
strange my document is in utf8 ...

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

More
13 years 11 months ago #22434 by ggppdk
micker what are you saying/asking about UTF8 and your document, can you describe in more details what is happening?


-- 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
13 years 11 months ago #22442 by micker
I put the code at previous in my template
It work perfect but Èé à ... doent display (?)
I try to save document in utf8 but ....same.eror

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

More
13 years 11 months ago #22445 by ggppdk
What is "Èé" is it AM and PM ?? that is printed by the strftime() function.
OR is it text that you write inside your document?

If it is text that you write inside your document you will need to convert "ASCII to UTF-8" via an editor. Of course the editor must be aware of the extended ASCII encoding you use before you click to convert.


-- 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