{"id":113,"date":"2020-06-02T21:24:23","date_gmt":"2020-06-02T21:24:23","guid":{"rendered":"http:\/\/bahadirmeric.net\/bahadir\/?p=113"},"modified":"2020-06-02T21:24:23","modified_gmt":"2020-06-02T21:24:23","slug":"javascript-adddate","status":"publish","type":"post","link":"http:\/\/bahadirmeric.net\/bahadir\/2020\/06\/02\/javascript-adddate\/","title":{"rendered":"JavaScript AddDate"},"content":{"rendered":"\n<p>Sizlerde bu \u015fekilde bir fonksiyon ar\u0131yor olabilirsiniz. Fakat hemen belirtmem laz\u0131m ki JavaScript\u2019 te C# daki gibi bu i\u015fi bir seferde halledebilece\u011finiz bir fonksiyon yok. Bunun i\u00e7in a\u015fa\u011f\u0131daki kodu deneyebilirsiniz.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n&lt;script type=&quot;text\/javascript&quot;&gt;\/\/ &lt;!&#x5B;CDATA&#x5B;\nvar rldate = new Date('2013','10','30');\nrldate.setDate(rldate.getDate() + 2);\nvar day = rldate.getDay();\nvar mm = rldate.getMonth();\nvar yy = rldate.getFullYear();\nalert(day + ' ' + mm + ' ' + yy);\n\/\/ ]]&gt;&lt;\/script&gt;\n<\/pre><\/div>\n\n\n<p>Ayr\u0131ca belirtmek isterim ki yukar\u0131da g\u00f6rd\u00fc\u011f\u00fcn\u00fcz \u201c<strong><em>.setDate<\/em><\/strong>\u201d fonksiyonu ay, y\u0131l ve saat ile saniye i\u00e7inde mevcut. Yani \u201c<strong><em>.setFullYear \u2013 .setYear<\/em><\/strong>\u201c, \u201c<strong><em>.setMonth<\/em><\/strong>\u201c, \u201c<strong><em>.setMinute<\/em><\/strong>\u201c, \u201c<strong><em>.setHour<\/em><\/strong>\u201d \u015feklinde.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sizlerde bu \u015fekilde bir fonksiyon ar\u0131yor olabilirsiniz. Fakat hemen belirtmem laz\u0131m ki JavaScript\u2019 te C# daki gibi bu i\u015fi bir seferde halledebilece\u011finiz bir fonksiyon yok. Bunun i\u00e7in a\u015fa\u011f\u0131daki kodu deneyebilirsiniz. Ayr\u0131ca belirtmek isterim ki yukar\u0131da g\u00f6rd\u00fc\u011f\u00fcn\u00fcz \u201c.setDate\u201d fonksiyonu ay, y\u0131l ve saat ile saniye i\u00e7inde mevcut. Yani \u201c.setFullYear \u2013 .setYear\u201c,&#8230; <a class=\"continue-reading-link\" href=\"http:\/\/bahadirmeric.net\/bahadir\/2020\/06\/02\/javascript-adddate\/\"> Continue reading <span class=\"meta-nav\">&rarr; <\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":12,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[12,6],"class_list":["post-113","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript","tag-javascript","tag-visual-studio"],"_links":{"self":[{"href":"http:\/\/bahadirmeric.net\/bahadir\/wp-json\/wp\/v2\/posts\/113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bahadirmeric.net\/bahadir\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bahadirmeric.net\/bahadir\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bahadirmeric.net\/bahadir\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/bahadirmeric.net\/bahadir\/wp-json\/wp\/v2\/comments?post=113"}],"version-history":[{"count":1,"href":"http:\/\/bahadirmeric.net\/bahadir\/wp-json\/wp\/v2\/posts\/113\/revisions"}],"predecessor-version":[{"id":114,"href":"http:\/\/bahadirmeric.net\/bahadir\/wp-json\/wp\/v2\/posts\/113\/revisions\/114"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/bahadirmeric.net\/bahadir\/wp-json\/wp\/v2\/media\/12"}],"wp:attachment":[{"href":"http:\/\/bahadirmeric.net\/bahadir\/wp-json\/wp\/v2\/media?parent=113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bahadirmeric.net\/bahadir\/wp-json\/wp\/v2\/categories?post=113"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bahadirmeric.net\/bahadir\/wp-json\/wp\/v2\/tags?post=113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}