web_master Posted June 13, 2010 Share Posted June 13, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/204652-date-day-name-on-other-language/ Share on other sites More sharing options...
Daniel0 Posted June 13, 2010 Share Posted June 13, 2010 You can use strftime, which is locale aware. Quote Link to comment https://forums.phpfreaks.com/topic/204652-date-day-name-on-other-language/#findComment-1071481 Share on other sites More sharing options...
web_master Posted June 13, 2010 Author Share Posted June 13, 2010 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)... Quote Link to comment https://forums.phpfreaks.com/topic/204652-date-day-name-on-other-language/#findComment-1071488 Share on other sites More sharing options...
web_master Posted June 14, 2010 Author Share Posted June 14, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/204652-date-day-name-on-other-language/#findComment-1071685 Share on other sites More sharing options...
web_master Posted June 14, 2010 Author Share Posted June 14, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/204652-date-day-name-on-other-language/#findComment-1071708 Share on other sites More sharing options...
Daniel0 Posted June 14, 2010 Share Posted June 14, 2010 You'll have to talk to your host about that. Seems they haven't got iconv installed. Quote Link to comment https://forums.phpfreaks.com/topic/204652-date-day-name-on-other-language/#findComment-1071758 Share on other sites More sharing options...
web_master Posted June 14, 2010 Author Share Posted June 14, 2010 You'll have to talk to your host about that. Seems they haven't got iconv installed. In meantime, I found it that the iconv is not installed on server, Thanx T Quote Link to comment https://forums.phpfreaks.com/topic/204652-date-day-name-on-other-language/#findComment-1071759 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.