[soved]change format date displaying

More
12 years 9 months 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
12 years 9 months 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
12 years 9 months 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
12 years 9 months 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
12 years 9 months 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...

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

More
12 years 9 months 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.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.419 seconds
Save
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