{"id":5647,"date":"2016-06-03T15:30:44","date_gmt":"2016-06-03T12:30:44","guid":{"rendered":"http:\/\/www.karadere.com\/blog\/?p=5647"},"modified":"2016-06-03T15:30:44","modified_gmt":"2016-06-03T12:30:44","slug":"php-turkce-tarih-problem-cozumu","status":"publish","type":"post","link":"https:\/\/www.karadere.com\/blog\/php-turkce-tarih-problem-cozumu.html","title":{"rendered":"PHP T\u00fcrk\u00e7e tarih problem \u00e7\u00f6z\u00fcm\u00fc"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"http:\/\/php.net\/images\/logo.php\" width=\"192\" height=\"96\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&lt;?php<br \/>\nfunction turkceTarih ($tarih,$yazdir = true) {<\/p>\n<p>date_default_timezone_set(&#8216;Europe\/Istanbul&#8217;);<\/p>\n<p>$gunler = array(&#8216;Pazar&#8217;,&#8217;Pazartesi&#8217;,&#8217;Sal\u0131&#8217;,&#8217;\u00c7ar\u015famba&#8217;,&#8217;Per\u015fembe&#8217;,&#8217;Cuma&#8217;,&#8217;Cumartesi&#8217;);<br \/>\n$aylar = array(&#8221;,&#8217;Ocak&#8217;,&#8217;\u015eubat&#8217;,&#8217;Mart&#8217;,&#8217;Nisan&#8217;,&#8217;May\u0131s&#8217;,&#8217;Haziran&#8217;,&#8217;Temmuz&#8217;,&#8217;A\u011fustos&#8217;,&#8217;Eyl\u00fcl&#8217;,&#8217;Ekim&#8217;,&#8217;Kas\u0131m&#8217;,&#8217;Aral\u0131k&#8217;);<\/p>\n<p>$tarih = strtotime($tarih);<\/p>\n<p>if ($yazdir) echo date(&#8216;d&#8217;,$tarih).&#8217; &#8216;.$aylar[date(&#8216;n&#8217;,$tarih)].&#8217; &#8216;.date(&#8216;Y&#8217;,$tarih).&#8217;, &#8216;.$gunler[date(&#8216;w&#8217;,$tarih)];<\/p>\n<p>else return date(&#8216;d&#8217;,$tarih).&#8217; &#8216;.$aylar[date(&#8216;n&#8217;,$tarih)].&#8217; &#8216;.date(&#8216;Y&#8217;,$tarih).&#8217;, &#8216;.$gunler[date(&#8216;w&#8217;,$tarih)];<br \/>\n}<br \/>\n$turkceTarih = turkceTarih(&#8216;01.05.2016&#8217;,false);<br \/>\necho $turkceTarih;<br \/>\n?&gt;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; &lt;?php function turkceTarih ($tarih,$yazdir = true) { date_default_timezone_set(&#8216;Europe\/Istanbul&#8217;); $gunler = array(&#8216;Pazar&#8217;,&#8217;Pazartesi&#8217;,&#8217;Sal\u0131&#8217;,&#8217;\u00c7ar\u015famba&#8217;,&#8217;Per\u015fembe&#8217;,&#8217;Cuma&#8217;,&#8217;Cumartesi&#8217;); $aylar = array(&#8221;,&#8217;Ocak&#8217;,&#8217;\u015eubat&#8217;,&#8217;Mart&#8217;,&#8217;Nisan&#8217;,&#8217;May\u0131s&#8217;,&#8217;Haziran&#8217;,&#8217;Temmuz&#8217;,&#8217;A\u011fustos&#8217;,&#8217;Eyl\u00fcl&#8217;,&#8217;Ekim&#8217;,&#8217;Kas\u0131m&#8217;,&#8217;Aral\u0131k&#8217;); $tarih = strtotime($tarih); if ($yazdir) echo date(&#8216;d&#8217;,$tarih).&#8217; &#8216;.$aylar[date(&#8216;n&#8217;,$tarih)].&#8217; &#8216;.date(&#8216;Y&#8217;,$tarih).&#8217;, &#8216;.$gunler[date(&#8216;w&#8217;,$tarih)]; else return date(&#8216;d&#8217;,$tarih).&#8217; &#8216;.$aylar[date(&#8216;n&#8217;,$tarih)].&#8217; &#8216;.date(&#8216;Y&#8217;,$tarih).&#8217;, &#8216;.$gunler[date(&#8216;w&#8217;,$tarih)]; } $turkceTarih = turkceTarih(&#8216;01.05.2016&#8217;,false); echo $turkceTarih; ?&gt;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":"","_links_to":"","_links_to_target":""},"categories":[2],"tags":[235,733,2017],"class_list":["post-5647","post","type-post","status-publish","format-standard","hentry","category-2015-2016","tag-php","tag-cozumu","tag-takvim","has-post-title","has-post-date","has-post-category","has-post-tag","has-post-comment","has-post-author",""],"aioseo_notices":[],"views":1053,"_links":{"self":[{"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/posts\/5647","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/comments?post=5647"}],"version-history":[{"count":1,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/posts\/5647\/revisions"}],"predecessor-version":[{"id":5648,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/posts\/5647\/revisions\/5648"}],"wp:attachment":[{"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/media?parent=5647"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/categories?post=5647"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/tags?post=5647"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}