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
https://forums.phpfreaks.com/topic/204652-date-day-name-on-other-language/
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)...

 

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

 

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.