{"id":353,"date":"2018-01-11T16:15:51","date_gmt":"2018-01-11T16:15:51","guid":{"rendered":"http:\/\/mddir.com\/how-to\/?p=353"},"modified":"2018-01-11T16:15:51","modified_gmt":"2018-01-11T16:15:51","slug":"the-php-date-function","status":"publish","type":"post","link":"https:\/\/www.mddir.com\/how-to\/the-php-date-function\/","title":{"rendered":"The PHP date function"},"content":{"rendered":"<p>The php date function is used to get the current data from the server or the computer system.<\/p>\n<p><strong>Example<\/strong><\/p>\n<p>[php]&lt;?php<br \/>\necho &quot;Today is &quot; . date(&quot;Y\/m\/d&quot;) . &quot;&lt;br&gt;&quot;;<br \/>\necho &quot;Today is &quot; . date(&quot;Y.m.d&quot;) . &quot;&lt;br&gt;&quot;;<br \/>\necho &quot;Today is &quot; . date(&quot;Y-m-d&quot;) . &quot;&lt;br&gt;&quot;;<br \/>\necho &quot;Today is &quot; . date(&quot;l&quot;);<br \/>\n?&gt;[\/php]<\/p>\n<p><strong>Code explanation<\/strong><\/p>\n<p>y &#8211; It represents the year.<br \/>\nm &#8211; It represents the month.<br \/>\nd &#8211; It represents the Date.<br \/>\nl &#8211; The lower case L represent the day.<\/p>\n<p><strong>Outcome<\/strong><\/p>\n<p><code>Today is 2018\/01\/11<br \/>\nToday is 2018.01.11<br \/>\nToday is 2018-01-11<br \/>\nToday is Thursday<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The php date function is used to get the current data from the server or the computer system. Example [php]&lt;?php echo &quot;Today is &quot; .<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-353","post","type-post","status-publish","format-standard","hentry","category-php"],"_links":{"self":[{"href":"https:\/\/www.mddir.com\/how-to\/wp-json\/wp\/v2\/posts\/353","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mddir.com\/how-to\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mddir.com\/how-to\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mddir.com\/how-to\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mddir.com\/how-to\/wp-json\/wp\/v2\/comments?post=353"}],"version-history":[{"count":1,"href":"https:\/\/www.mddir.com\/how-to\/wp-json\/wp\/v2\/posts\/353\/revisions"}],"predecessor-version":[{"id":354,"href":"https:\/\/www.mddir.com\/how-to\/wp-json\/wp\/v2\/posts\/353\/revisions\/354"}],"wp:attachment":[{"href":"https:\/\/www.mddir.com\/how-to\/wp-json\/wp\/v2\/media?parent=353"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mddir.com\/how-to\/wp-json\/wp\/v2\/categories?post=353"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mddir.com\/how-to\/wp-json\/wp\/v2\/tags?post=353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}