Jump to content

date day-name on other language


web_master

Recommended Posts

Hi,

 

I'm reload from database the given year, month and day

 

and its looks like this: date($REQUESTHEAD['date_year'] . '. ' . $REQUESTHEAD['programs_month'] . ' ' . $REQUESTHEAD['programs_day'] );

 

after the print on screen is looks like this:  2011. 9 10

 

How can I add the day-name too?

 

Like (that date is on saturday): 2011. 9 10 (Saturday)

 

BUT, I want that day-name on other language (german, hungarian... or other)

 

Thanx

 

T

Link to comment
Share on other sites

You can use strftime, which is locale aware.

 

Well, maybe I don't understand, but I dont want the day-name of today, I want to give a day-name of the date, what is stored in database...

The stored date is 2011. 9 10, and I want to add the day-name what will be on that day (date)...

 

Link to comment
Share on other sites

Hi,

 

I can't sleep tonight, because I want to solve this problem, so I find how can I do this:

 

setlocale(LC_ALL, 'hungarian');
echo (iconv('ISO-8859-2', 'UTF-8', strftime('%Y. %B %d. (%A)', mktime('0', '0', '0', '6', '18', '2010'))));

 

or

 

setlocale(LC_ALL, 'german');
echo (iconv('ISO-8859-2', 'UTF-8', strftime('%Y. %B %d. (%A)', mktime('0', '0', '0', '6', '18', '2010'))));

 

...

 

Daniel0 thank You, You're recommendations helps me to find how to do that - I hope that will help some other who have same problem.

 

Best regards,

 

T

 

Link to comment
Share on other sites

Hi,

 

there is another problem with iconv()

 

When I upload file on server with script:

 

iconv('ISO-8859-1', 'UTF-8', strftime('%Y. %B %d. (%A)', mktime('0', '0', '0', $REQUESTHEAD['programs_month'], $REQUESTHEAD['programs_day'], $REQUESTHEAD['date_year'])));

 

and list from database its work 2-3 refreshes, and after that there is an error message:

 

Fatal error: Call to undefined function: iconv() in /home/...

 

On my computer (server) its work fine... :(

 

T

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.