Создание сайтов, поисковое продвижение, разработка веб-приложений.
+7 (987) 254-02-67
Email: feedback@goinweb.ru
ул. Новоженова 90/1, офис 419

code-date

Иногда нужно вывести дату и не просто день, месяц, год числами, а красиво с названиями дня недели и месяца и всё это на родном языке.  Известно, что  в языке PHP есть функция “date”, которая возвращает  дату. Но естественно только на английском. Выглядит это примерно так:  Thursday, 28 October 2010 г.
Выглядит как-то не очень.
Хотелось бы примерно так:  Четверг, 28 Октября 2010 г.

Решение очень простое:

<?php 
function russian_date() {
 $translation = array(
 "am" => "дп",
 "pm" => "пп",
 "AM" => "ДП",
 "PM" => "ПП",
 "Monday" => "Понедельник",
 "Mon" => "Пн",
 "Tuesday" => "Вторник",
 "Tue" => "Вт",
 "Wednesday" => "Среда",
 "Wed" => "Ср",
 "Thursday" => "Четверг",
 "Thu" => "Чт",
 "Friday" => "Пятница",
 "Fri" => "Пт",
 "Saturday" => "Суббота",
 "Sat" => "Сб",
 "Sunday" => "Воскресенье",
 "Sun" => "Вс",
 "January" => "Января",
 "Jan" => "Янв",
 "February" => "Февраля",
 "Feb" => "Фев",
 "March" => "Марта",
 "Mar" => "Мар",
 "April" => "Апреля",
 "Apr" => "Апр",
 "May" => "Мая",
 "May" => "Мая",
 "June" => "Июня",
 "Jun" => "Июн",
 "July" => "Июля",
 "Jul" => "Июл",
 "August" => "Августа",
 "Aug" => "Авг",
 "September" => "Сентября",
 "Sep" => "Сен",
 "October" => "Октября",
 "Oct" => "Окт",
 "November" => "Ноября",
 "Nov" => "Ноя",
 "December" => "Декабря",
 "Dec" => "Дек",
 "st" => "ое",
 "nd" => "ое",
 "rd" => "е",
 "th" => "ое",
 );
 if (func_num_args() > 1) {
 $timestamp = func_get_arg(1);
 return strtr(date(func_get_arg(0), $timestamp), $translation);
 } else {
 return strtr(date(func_get_arg(0)), $translation);
 };
}
?>

Теперь выводим где нужно:

<?php echo russian_date("l, j F Y г."); ?>

В выводе, можно менять последовательность (день, месяц, год) и добавит стили по вкусу.

Не дорого и в срок разработаем сайт для Вас.

Комментарии  

#1 sad 20.04.2018 07:12
온카지노www.88nat.c om 온카지노주소|타이샨카지노|온 카지노사이트|온카지노도메인| 온 카지노|온카지노먹튀|온카지노카톡|카지노사이트|카지노추천|온라인카지노
온카지노 http://www.88nat.com 온카지노
온카지노 http://www.88tut.com 온카지노도메인
온카지노 http://www.88qnt.com 온카지노먹튀
온카지노 http://www.99uts.com 온카지노주소
온카지노 http://www.99kmt.com 온카지노사이트
온카지노 http://www.88nat.com 타이샨카지노
온카지노 http://www.88tut.com 온라인카지노
온카지노 http://www.88qnt.com 라이브카지노
온카지노 http://www.88qnt.com 온 카지노
온카지노 http://www.99uts.com On Casino
온카지노 http://www.99kmt.com 온카지노추천
온카지노 http://www.88tut.com 카지노사이트
온카지노 http://www.cnn94.com 온카지노
OK카지노 http://www.efm84.com 오케이카지노
오케이카지노 http://www.efm84.com OK카지노
vic카지노 http://www.btk55.com 빅카지노
빅카지노 http://www.btk55.com vic카지노
먹튀제보 http://www.mtpark.net 먹튀검증
먹튀검증 http://www.mtpark.net 먹튀제보
#2 profile7945 02.11.2018 16:54
Need cheap hosting? Try webhosting1st, just $10 for an year.

https://www.journeytohealingandjoy.com/images/photos/7222/323/d26cc16dd7535f2bdd9ba286.jpg
#3 profile3161 02.11.2018 17:04
Need cheap hosting? Try webhosting1st, just $10 for an year.

http://www.picrap.it/images/photos/281/1/f88942144c08a387cd76dbdb.jpg
#4 LesBroole 27.03.2020 20:30
What Are The Ingredients In Amoxicillin https://apcialisle.com/# - Cialis Kamagra 100mg Montpellier Cialis Kamagra Oral Jelly Flavours
#5 StepToowl 12.04.2020 02:19
Louer Levitra Generique cialis no prescription Amoxicillin Sun Effects generic cialis release date Priligy 30mg Wiki
#6 StepToowl 16.04.2020 09:12
Comprar Cialis Online En Madrid cialis buy online Whare Can I Get Cialis No Prescription cialis without prescription Cialis Samples
#7 Irene 08.06.2021 11:11
Then, when the poor woman uses the stimulant, strong ammonia gas is released. To change the flower to blue. http://xn--o80b27i69npibp5en0j.vom77.com
#8 Willie 25.06.2021 09:11
It'ѕ awesome tо pay a quick visit this web sіte and
reading the views of all friends about tһis article, while I am
aⅼso zealous of getting know-how.

My ѕite :: Bokeց
Yoga hongkⲟng: https://next360.com/index.php?action=profile;u=101066
#9 Meri 04.07.2021 02:33
These numbers get bigger as you update to other plans, with company as well as venture plans available.


Feel free to visit my page rankerx review: http://Pekids.com/__media__/js/netsoltrademark.php?d=rankerxreviews.wikidot.com
#10 Josefa 04.07.2021 04:12
Powered by Google, it supplies smooth integration with various other analytics systems like Google search console as well as
Google Analytics.

Also visit my web blog; rankerx crack: http://xh7858.com/comment/html/?38730.html
#11 Helaine 04.07.2021 21:20
Obtaining beauty sleep may even increase HGH production, sso go ahead andd take that
power nap.

my web page :: click this: https://zooferon.ru/cpt-code-ingrown-eyelash
#12 Jere 04.07.2021 22:40
Take your time with these and also go lighter so you can emphasize
the medial delt without entailing various other muscular tissues to do the work.


my blog :: Find
Out More: http://www.Ardenneweb.eu/archive?body_value=%25+of+individuals+told+us+that+this+article+helped+them.+As+soon+as+your+dog+has+ended+up+expanding%2C+the+vet+will+certainly+offer+an+additional+anesthetic+and+also+get+rid+of+the+adding+sutures.+Rather+than+swiping+its+eye+with+a+paw%2C+your+dog+might+massage+its+face+along+the+ground.+After+a+life+time+of+experience+as+an+exercising+doctor%2C+Dr.+Stephen+Cohen+has+actually+developed+a+repository+of+insightful+medical+information.%3Cbr%3E+%3Cbr%3E++%3Cbr%3E+%3Cbr%3E++This+condition+occurs+among+the+elderly+and+hardly+ever+amongst+the+younger+age.+This%2C+nonetheless%2C+is+commonly+misdiagnosed+as+trichiasis.+One+point+is+that+entropion+may+lead+to+trichiasis+but+these+two+conditions+are+various+from+each+various+other.+The+eyelashes+are+anchored+to+the+eyelids%2C+likewise+called+the+palpebrae.+The+eyelids+are+developed+by+enhanced+skin+folds+up.%3Cbr%3E+%3Cbr%3E++Trichiasis+%28In-grown+Eyelashes%29%3A+Causes%2C+Symptoms+And+Also+Treatment.%3Cbr%3E+%3Cbr%3E++This+involves+your+eyelash+transformed+inwards+as+well+as+massages+versus+your+eyeball.+If+enabled+to+linger%2C+it+creates+damage+as+well+as+scarring+to+the+cornea.+This+is+usually+a+follow-up+impact+after+a+first+round+of+inflammation.+In-grown+eyes+are+identifiable+by+discomfort+and+inflammation+around+your+eyes.+Watery+eyes+and+also+blurred+vision+can+additionally+be+signs+and+symptoms.%3Cbr%3E+%3Cbr%3E++%3Cbr%3E+%3Cbr%3E++The+eyelash+may+be+tweezed+out+or+removed+very+first+after+that+the+continuing+to+be+hair+follicle+will+be+iced+up+with+liquid+nitrogen.+This+will+prevent+brand-new+eyelash+from+expanding+on+this+impacted+roots.+A+surgical+procedure+may+likewise+be+done+to+correct+the+ingrown.+This+might+be+by+removing+bumps+or+correcting+scars+that+advertise+abnormal+development+instructions+of+the+eyelashes.+However%2C+this+is+only+reliable+on+a+couple+of+eyelashes.%3Cbr%3E+%3Cbr%3E++Issues+After+Retinal+Openings+Laser+Surgical+Procedure.%3Cbr%3E+%3Cbr%3E++The+relaxing+coolness+of+fresh+cucumbers+relieves+the+heat+and+discomfort.+Using+pieces+over+the+eye+likewise+aids+in+rehydrating+the+skin+over+the+location.+This+can+aid+reinforce+the+skin+against+conditions+that+can+create+trichiasis.%3Cbr%3E+%3Cbr%3E++Swelling+might+additionally+be+effectively+minimized+when+turmeric+paste+is+used+over+the+affected+area.Cryoablation+permanently+eliminates+the+ingrown.This+stops+the+removal+of+to+much+skin+simultaneously+as+well+as+one+more+surgical+treatment+can+be+included+if+the+entropion+is+still+existing+after+the+initial+surgical+procedure.Entropion+is+caused+by+maturing+tissues+as+well+as+muscle+mass+around+the+eye%2C+which+create+the+reduced+eyelid+great+post+to+read%3B++link+homepage+-+https%3A%2F%2Fexenin.com%2Fdisturbios-geneticos%2Fdoenca-tanger%2F+%2C+fold+internal.%3Cbr%3E+%3Cbr%3E++Ingrown+eyelash+can+be+an+agonizing+as+well+as+really+bothersome+problem.+It+needs+to+be+treated+as+well+as+the+annoying+eyelash+needs+to+be+removed+immediately.+If+the+damage+is+excellent+sufficient%2C+blindness+might+occur.+Infections+may+also+set+in+on+the+damaged+locations+of+the+eye+and+the+eyelid.+Cryoablation+permanently+removes+the+ingrown.+That+indicates+no+more+eyelash+will+expand+from+the+treated+roots.%3Cbr%3E+%3Cbr%3E++Coconut+Oil.%3Cbr%3E+%3Cbr%3E++Hence%2C+the+eyelashes+appear+to+expand+in+the+direction+of+the+direction+of+the+eyeball.+Stye+may+cause+an+infection+to+create+along+the+row+of+eyelashes+as+well+as+on+the+glands+of+the+eyelids.+This+infection+can+spread+and+include+the+origins+of+the+eyelashes.%3Cbr%3E+%3Cbr%3E++%3Cbr%3E+%3Cbr%3E++The+cornea+can+come+to+be+nontransparent+because+of+the+continuous+tearing+of+the+eyes.+Thus%2C+the+eye+continuously+creates+splits+in+a+proceeding+attempt+to+clear+itself+of+the+foreign+things.+When+an+acne+or+eyelash+bump+appears%2C+never+attempt+to+pop+it.+This+might+likewise+hurt+the+eyeball+and+nearby+frameworks.+This+is+a+skin+disorderwhere+the+skin+cells+rapidly+multiply.+This+is+an+unpredictable+problem+since+anything+can+activate+this+quick+skin+cell+turn+over.
#13 Emilio 05.07.2021 01:21
This will remove the eyelash and also needs to aid
a repeating condition.

Here is my web-site: go right here: https://iwikidb.com/index.php?title=User:WillieGoldschmid
#14 Julie 05.07.2021 02:39
After filling a comkfortable weight on bench, keep your feet about shoulder-width apart with
toes aiming onward.

Here iss mmy page :: read more: https://articleweb55.com/diarrhea-and-also-throwing-up/
#15 Pedro 05.07.2021 03:00
Your genetics can additionally add to health problems that affect your elevation, like Gigantism
or Marfan syndrome.

Here is my blog - click for source: http://michaeldietrich.webspace.htl-donaustadt.at/groups/nausea-throwing-up/
#16 Aleida 05.07.2021 03:06
Personally, itt appears unsafe, dangerous, and pointless.


Here is my site; Learn More: http://mick0711.com/2021/06/23/treating-vomiting/
#17 Jackson 05.07.2021 03:15
Due to the fact that it helps out to minimize burning, aches, oor
discomfort around the in-grown eyelash from the eyelid.



Feel free to surf to my blog post; Recommended Site: http://pokemongo5.esy.es/community/profile/chutribolet357/
#18 German 05.07.2021 03:18
This Yoga aasan extends the vertebra as well ass establishes it straight and
hence makes you look taller.

Also visit my page; visit here: http://www.rc-model-review.co.uk/classified-ads/helicopters/specific-exercises-expand-taller
#19 Clarita 05.07.2021 03:18
Personally, it seems dangerous, dangerous, as well as meaningless.



My website click site: http://www.pandm2015.com/treat-your-in-grown-eyelash-with-6-natural-home-remedy/
#20 Sheldon 05.07.2021 03:19
The hips is very important to preserve an appropriate stance.



Also visit my blog post :: this post: http://thedefenseshop.com/4-ways-to-get-taller-by-extending/
#21 Edwardo 05.07.2021 03:24
Raise your hips up off the ground as high as you can as well as press your glutes at
the top of the motion.

Also visit my wweb page - find more
information: https://Rrota24.com/?p=226416
#22 Tyrone 05.07.2021 03:28
Onee would think that a lack of sleep would create stnted development.


My web blog; you
can try this out: http://cccam-feve.com/2021/06/25/top-10-exercises-to-grow-your-glutes/
#23 Freddie 27.07.2021 06:16
Also in-grown eyelashes occurring at the corner of the eye
can still create substantial scrapes on the cornea.


Feel free to visit my blog post i thought
about this: http://xh7858.com/comment/html/?190622.html
#24 Mobile Application 02.10.2021 21:27
A lot of thanks for all of your efforts on this web site. My mom delights in carrying out investigations and it's really obvious why. We all know all about the powerful means you give vital information via this blog and recommend contribution from other people about this issue plus our own princess is really becoming educated a lot of things. Enjoy the remaining portion of the new year. You are always conducting a great job. blog
I always use url shortener
It is very helpful.
#25 Mobile Application 06.10.2021 20:21
Thank you for your whole efforts on this web page. Debby really likes conducting research and it is easy to understand why. I learn all relating to the dynamic way you present very useful ideas through the website and even welcome response from other ones about this situation plus our own princess is in fact learning so much. Have fun with the remaining portion of the year. You are always performing a tremendous job. blog
I always use url shortener
It is very helpful.

Добавить комментарий

Защитный код
Обновить

Бесплатная консультация

Вам нужен сайт, но вы не знаете с чего начать? Оставьте ваши имя и телефон, мы перезвоним и бесплатно проконсультируем Вас.

Бесплатная консультация по телефону:

+7 987 2540267
Ежедневно c 10:00ч до 20:00ч.

 

Услуги | Портфолио | Блог | РБ
Перепечатка информации с сайта www.goinweb.ru, возможна только с указанием активной гиперссылки.
Веб-студия «GOINWEB»: Разработка, продвижение, обслуживание и поддержка веб-сайтов. E-mail:feedback@goinweb.ru
Яндекс.Метрика