chrometweaks.org

What is the best free iPage web host to use?

Click Here To View All Answers...


First of all What is the best free iPage web host to use? Many thanks for any response. 2nd question I got is.. I am trying to change the date format and error checking to english date.

(dd/mm/yyyy).

I seem to have it working for the 'create account' part exactly as I want, and the javascript errors at the correct time..

But.....

When a user edits their account (account_edit.php), whatever they input into the date field gets changed into mm/dd/yyyy. this is very unusual, because I would have expected it to use the same error checking/database modification queries as the 'create account' part, therefore erroring because the date format was wrong, not switching the date and month and updating the database?.

Could someone please explain exactly where I have to modify the format? I'm sure I must have missed one of the places or something..

Any help wll be greatly appreciated...

Comments (52)

Good question... I dunno what is the answer. I'll do some poking around and get back to you if I find an good answer. You should email the people at iPage as they probably can help you..

Comment #1

Surely it's not that simple.

I thought I already did that.....

But ill check..

Comment #2

Ye I had already done that.....

Does the javascript error checking function need modding?.

Or maybe this function.

Function tep_date_raw($date, $reverse = false) {.

If ($reverse) {.

Return substr($date, 3, 2)substr($date, 0, 2)substr($date, 6, 4);.

} else {.

Return substr($date, 6, 4)substr($date, 0, 2)substr($date, 3, 2);.

}.

}.

I am a bit stuck cos I cannot find what is causing the problem on the account editing page. and why it works on the 'adding' user page but not on the editing page..

O and by the way - you also need to change this line on english.php to look like I posted below.

Define('DOB_FORMAT_STRING', 'dd/mm/yyyy');.

This post has been edited by.

Gazzzzzza.

: 31 August 2004, 08:24..

Comment #3

I don't know why but doing that seriously messes with my boxes. the script cant grab the header for it and replaces it with BOX_HEADER......

Anyway, that obviously stretches the page. I've changed it back but isn't that strange!..

Comment #4

Thats weird lol.

O well...it needs doing to get date working properly I'm guessing.....

Dont know what to suggest.

Does your account editing date function work ok?..

Comment #5

How or where do I go to test that?.

All of the dates appear to be the right way around on my site. Even with the demo accounts who registered in the american style format, has been switched around to dd/mm/yyyy..

Comment #6

Go to 'my account' there is usually a link in the top right of your site..

Then go to 'view or change my account details'.

In there you can change your birth date.

This is where mine is erroring. it's giving me an error saying incorrect date (i changed the error message so it asks for the english date (in english php)) but it only lets me change the date if I put in the american format. if I put in english date, then it errors.

The initial american dates you entered makes no difference. this is because all of them go into the database the same way. it is how they are dragged out that you were setting in english.php. thats what changes- so you could change it anytime and it would get them how you wanted..

The date format function is pretty cool.

This post has been edited by.

Gazzzzzza.

: 31 August 2004, 10:08..

Comment #7

Frett no more boys, the answer is here:.

THE 'REAL' FIX.

...

Comment #8

I am trying to change the date format and error checking to english date.

(dd/mm/yyyy).

I seem to have it working for the 'create account' part exactly as I want, and the javascript errors at the correct time..

But.....

When a user edits their account (account_edit.php), whatever they input into the date field gets changed into mm/dd/yyyy. this is very unusual, because I would have expected it to use the same error checking/database modification queries as the 'create account' part, therefore erroring because the date format was wrong, not switching the date and month and updating the database?.

Could someone please explain exactly where I have to modify the format? I'm sure I must have missed one of the places or something..

Any help wll be greatly appreciated...

Comment #9

By interested I meant it was on the list of things for me to do. Just had a quick play and here is how to do it..

Catalog/languages/english.php (starting line 21).

Change:.

Define('DATE_FORMAT_SHORT', '%m/&d/%Y');  // this is used for strftime().

Define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime().

Define('DATE_FORMAT', 'm/d/Y'); // this is used for date().

Define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT' %H:%M:%S');.

To:.

Define('DATE_FORMAT_SHORT', '%d/&m/%Y');  // this is used for strftime().

Define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime().

Define('DATE_FORMAT', 'd/m/Y'); // this is used for date().

Define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT' %H:%M:%S');.

Hope that helps and if you have any problems just ask!..

Comment #10


This question was taken from a support group/message board and re-posted here so others can learn from it.