Date format displayed in profiles

Hi,

Date format currently display like YYYY-MM-DD in profiles. I would like to change to DD/MM/YYYY which is used in Europe. Date format in admin don't change date profile's format.

Anyone know a solution ?

Quote · 31 May 2008

You change the date format in admin panel as per your needs.

----
Quote · 31 May 2008

make it m/d/Y

----
Quote · 31 May 2008

Off course I already changed date format in panel admin as I said, but it has no effect on profile birthday field (it works for all dates in other places, like blogs)! Any idea ?

Quote · 31 May 2008

This date is going me crazy. Don't know how to solve this basic problem. Date show in profile like YYYY-MM-DD. I want to reverse it like DD-MM-YYYY.

Admin settings have no effect for this date !

Thanks for your help !

Quote · 8 Jun 2008

Did you ever figure this out?
I have not been able to successfully modifiy the format for the dates of Last Profile Edit, Registration Date and Last Online...

Quote · 27 Jun 2008

BUMP.  The admin panel date format has no effect on the site.  Someone please enlighten us!

Quote · 29 Jun 2008

Hi guys,

No I didn't find a solution for this problem... Still searching for a solution!

Best regard

Quote · 30 Jun 2008

I wrote about this issue in unoboonex's blog post, don't know if it will be addressed or not.  In the meantime, BUMP!

Quote · 15 Jul 2008

Hi guys, as you notice - since 6.1.2 all datatime (quite all places at index page/ profile/ member pages, classifieds/blogs/events ... many places) was localized, so now possible have data at different languages,

It was realized using new lang keys (_day_of_1  - _day_of_12) - that mean localized month, to just change format using lang file

Quote · 16 Jul 2008

AndreyP, I don't quite understand what I need to do to get date to show dd/mm/yy.

 

Right now, my _day_of_1 is set to {0} January, {1}

_day_of_2 is set to {0} February, {1}

 

and so forth...

 

So what does it need to be???  Please give an example?

Quote · 16 Jul 2008

Look here:

_day_of_1 is set to {0} January, {1}

so as result it become to

12 January, 2008

as example,

so to change format you can just change value ..

next example:

{1}-Jan-{0}

result will

2008-Jan-12

Understand now?

you can create your own format here at any languages :)

Quote · 17 Jul 2008

 

Look here:

_day_of_1 is set to {0} January, {1}

 

so as result it become to

 

12 January, 2008

 

as example,

so to change format you can just change value ..

 

next example:

 

{1}-Jan-{0}

 

result will

2008-Jan-12

 

Understand now?

you can create your own format here at any languages :)

 

OK I see.  So to get format Jan-12-2008, I need:

 

_day_of_1 = January {0}, {1}

 

I will give it a shot.  Thanks bro!

Quote · 17 Jul 2008

This is not working into profiles... on blogs and news yes.

Kids first
Quote · 17 Jul 2008

 

 

 

OK I see.  So to get format Jan-12-2008, I need:

 

_day_of_1 = January {0}, {1}

 

I will give it a shot.  Thanks bro!

 This worked for me.  I still don't necessarily understand why doing it this way is better or more desirable than setting the date format through the admin panel, but whatever...IT WORKS!  Thanks again AndreyP!

Quote · 17 Jul 2008

This was realized just because many peoples asks about custom formats and possibility to translate this (before all dates was in english)

Quote · 18 Jul 2008

Finaly an answer for my problem.....

 

xxxxxxxxxxx

Right now, my _day_of_1 is set to {0} January, {1}

_day_of_2 is set to {0} February, {1}

 

and so forth...

xxxxxxxxxxx

 

I didn`t have these keys in, and the date on blogs, news, and events were showing day_of_6....or so....gave it a try and now it shows the date....Jeez...

 

Thank you guys...

 

 

 

Quote · 19 Jul 2008

I have the same issue in "My Profile" in "Misc Info".

I'd like to have the birthday and registration date changed to format like "last login date".

The _day_of_10 is set to {0}. Oktober {1} and the same style for the other month.

Any further solutions?

Thanks Tom

Sex: Male
Date Of Birth: 1977-10-27
Registration Date: 2008-06-27 20:38:33
Last profile edition date: 01.07.08 15:01
Last Login Date:

19.07.08 12:42

Quote · 19 Jul 2008

Still no fix for this wrong date of birth format in profile (yyyy-mm-dd)

Where is such format used ??? in the moon ??? he he he

Life is a fatal disease, sexually transmissible - Virginity is carcinogenic! Ask here for vaccine.
Quote · 28 Jul 2008

This was realized just because many peoples asks about custom formats and possibility to translate this (before all dates was in english)

Regarless of what language it is in, how do you FORMAT the date to display

the way you want it in the other places???

i.e.

7/28/2008

2008/7/28

28/7/2008

2008/28/7

Quote · 28 Jul 2008

inc/classes/BxDolProfileFields.php solution works, but it mess "last login" and "last edit" dates. So small correction can fix that too.

find:

function getViewableDate( $sDate ) {
return $sDate;
}

and replace it with:

function getViewableDate( $sDate ) {
return (strftime(getParam('short_date_format'), strtotime($sDate)));
}

function getViewableDate2( $sDate ) {
return $sDate;
}

Now we have two functions: one that we modified and will use for our date and original one getViewableDate2 which will use to avoid wrong "last" dates. Now we need to go and use that getViewableDate2 at "last" dates. Find this function getViewableValue( $aItem, $sValue ) and there is:

case 'DateLastEdit':
case 'DateLastLogin':
return $this -> getViewableDate( $sValue );

just replace getViewableDate with getViewableDate2 like:

case 'DateLastEdit':
case 'DateLastLogin':
return $this -> getViewableDate2( $sValue );

and done. Now you have correct dates for DOB and last login/edit.

Cheers,

George

Quote · 3 Sep 2008

 thanks this did fix the login date problem. could you tell me how to get rid of the time stamp it adds after the date?

 

 

inc/classes/BxDolProfileFields.php solution works, but it mess "last login" and "last edit" dates. So small correction can fix that too.

find:

function getViewableDate( $sDate ) {
return $sDate;
}

and replace it with:

function getViewableDate( $sDate ) {
return (strftime(getParam('short_date_format'), strtotime($sDate)));
}

function getViewableDate2( $sDate ) {
return $sDate;
}

Now we have two functions: one that we modified and will use for our date and original one getViewableDate2 which will use to avoid wrong "last" dates. Now we need to go and use that getViewableDate2 at "last" dates. Find this function getViewableValue( $aItem, $sValue ) and there is:

case 'DateLastEdit':
case 'DateLastLogin':
return $this -> getViewableDate( $sValue );

just replace getViewableDate with getViewableDate2 like:

case 'DateLastEdit':
case 'DateLastLogin':
return $this -> getViewableDate2( $sValue );

and done. Now you have correct dates for DOB and last login/edit.

Cheers,

George

 

 

Quote · 17 Oct 2008

hi exoexo:

thank you for your fix to the date format issue. i was having the same issue. it works great! thanks again.

Quote · 23 Feb 2009

i have a date function in a file that includes to this file shamsi.php.

for use this function i should use jgmdate() insted of date() .

how can i use this for login date and time?

Quote · 3 Oct 2011
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.