{"id":2728,"date":"2011-11-27T21:17:08","date_gmt":"2011-11-28T05:17:08","guid":{"rendered":"https:\/\/edelalon.com\/blog\/?p=2728"},"modified":"2024-10-05T01:21:12","modified_gmt":"2024-10-05T08:21:12","slug":"php-code-to-display-year","status":"publish","type":"post","link":"https:\/\/www.edelalon.com\/blog\/2011\/11\/php-code-to-display-year\/","title":{"rendered":"PHP Code to Display Year"},"content":{"rendered":"<p><a href=\"https:\/\/edelalon.com\/blog\/wp-content\/uploads\/2009\/06\/calendar.jpg\"><img decoding=\"async\" class=\"alignleft size-full wp-image-594\" title=\"calendar\" src=\"https:\/\/edelalon.com\/blog\/wp-content\/uploads\/2009\/06\/calendar.jpg\" alt=\"\" width=\"73\" height=\"78\" \/><\/a> A new year is almost year and I&#8217;m getting reminded to update my websites with the copyright years at the bottom&#8230;you know the Copyright 2000-current year.<\/p>\n<p>Instead of manually doing this ever year, I decided to put in a snippet of PHP code to cover all my bases.<\/p>\n<p>Here&#8217;s the code:<\/p>\n<p><strong>&lt;? print(Date(&#8220;Y&#8221;)); ?&gt;<\/strong><\/p>\n<p>Enjoy! And Happy New Year!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A new year is almost year and I&#8217;m getting reminded to update my websites with the copyright years at the bottom&#8230;you know the Copyright 2000-current year. Instead of manually doing this ever year, I decided to put in a snippet of PHP code to cover all my bases. Here&#8217;s the code: &lt;? print(Date(&#8220;Y&#8221;)); ?&gt; Enjoy! [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":547,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"tdm_status":"","tdm_grid_status":"","footnotes":""},"categories":[44],"tags":[311],"class_list":["post-2728","post","type-post","status-publish","format-standard","has-post-thumbnail","category-technology","tag-coding"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>PHP Code to Display Year &#8226; Edel Alon<\/title>\n<meta name=\"description\" content=\"Hello, we have well thought out reading topics on technology, leadership, project management, food, weddings, and tools to help your daily life. Need some Excel tips or wedding planning advice? Read now and don&#039;t forget to comment.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.edelalon.com\/blog\/2011\/11\/php-code-to-display-year\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PHP Code to Display Year &#8226; Edel Alon\" \/>\n<meta property=\"og:description\" content=\"Hello, we have well thought out reading topics on technology, leadership, project management, food, weddings, and tools to help your daily life. Need some Excel tips or wedding planning advice? Read now and don&#039;t forget to comment.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.edelalon.com\/blog\/2011\/11\/php-code-to-display-year\/\" \/>\n<meta property=\"og:site_name\" content=\"Edel Alon\" \/>\n<meta property=\"article:published_time\" content=\"2011-11-28T05:17:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-05T08:21:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.edelalon.com\/blog\/wp-content\/uploads\/2009\/04\/excelcalendar.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"200\" \/>\n\t<meta property=\"og:image:height\" content=\"173\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Edel Alon\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Edel Alon\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.edelalon.com\\\/blog\\\/2011\\\/11\\\/php-code-to-display-year\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.edelalon.com\\\/blog\\\/2011\\\/11\\\/php-code-to-display-year\\\/\"},\"author\":{\"name\":\"Edel Alon\",\"@id\":\"https:\\\/\\\/www.edelalon.com\\\/blog\\\/#\\\/schema\\\/person\\\/aaf86bfa75efb59a5f0855c63e330e42\"},\"headline\":\"PHP Code to Display Year\",\"datePublished\":\"2011-11-28T05:17:08+00:00\",\"dateModified\":\"2024-10-05T08:21:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.edelalon.com\\\/blog\\\/2011\\\/11\\\/php-code-to-display-year\\\/\"},\"wordCount\":69,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.edelalon.com\\\/blog\\\/#\\\/schema\\\/person\\\/aaf86bfa75efb59a5f0855c63e330e42\"},\"image\":{\"@id\":\"https:\\\/\\\/www.edelalon.com\\\/blog\\\/2011\\\/11\\\/php-code-to-display-year\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.edelalon.com\\\/blog\\\/wp-content\\\/uploads\\\/2009\\\/04\\\/excelcalendar.jpg\",\"keywords\":[\"coding\"],\"articleSection\":[\"Technology\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.edelalon.com\\\/blog\\\/2011\\\/11\\\/php-code-to-display-year\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.edelalon.com\\\/blog\\\/2011\\\/11\\\/php-code-to-display-year\\\/\",\"url\":\"https:\\\/\\\/www.edelalon.com\\\/blog\\\/2011\\\/11\\\/php-code-to-display-year\\\/\",\"name\":\"PHP Code to Display Year &#8226; Edel Alon\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.edelalon.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.edelalon.com\\\/blog\\\/2011\\\/11\\\/php-code-to-display-year\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.edelalon.com\\\/blog\\\/2011\\\/11\\\/php-code-to-display-year\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.edelalon.com\\\/blog\\\/wp-content\\\/uploads\\\/2009\\\/04\\\/excelcalendar.jpg\",\"datePublished\":\"2011-11-28T05:17:08+00:00\",\"dateModified\":\"2024-10-05T08:21:12+00:00\",\"description\":\"Hello, we have well thought out reading topics on technology, leadership, project management, food, weddings, and tools to help your daily life. Need some Excel tips or wedding planning advice? Read now and don't forget to comment.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.edelalon.com\\\/blog\\\/2011\\\/11\\\/php-code-to-display-year\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.edelalon.com\\\/blog\\\/2011\\\/11\\\/php-code-to-display-year\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.edelalon.com\\\/blog\\\/2011\\\/11\\\/php-code-to-display-year\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.edelalon.com\\\/blog\\\/wp-content\\\/uploads\\\/2009\\\/04\\\/excelcalendar.jpg\",\"contentUrl\":\"https:\\\/\\\/www.edelalon.com\\\/blog\\\/wp-content\\\/uploads\\\/2009\\\/04\\\/excelcalendar.jpg\",\"width\":200,\"height\":173},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.edelalon.com\\\/blog\\\/2011\\\/11\\\/php-code-to-display-year\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.edelalon.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PHP Code to Display Year\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.edelalon.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.edelalon.com\\\/blog\\\/\",\"name\":\"Edel Alon\",\"description\":\"Projects, Tools, Craft, Food, Music, and Other Stuff\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.edelalon.com\\\/blog\\\/#\\\/schema\\\/person\\\/aaf86bfa75efb59a5f0855c63e330e42\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.edelalon.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.edelalon.com\\\/blog\\\/#\\\/schema\\\/person\\\/aaf86bfa75efb59a5f0855c63e330e42\",\"name\":\"Edel Alon\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.edelalon.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/edel-alon-logobl.png\",\"url\":\"https:\\\/\\\/www.edelalon.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/edel-alon-logobl.png\",\"contentUrl\":\"https:\\\/\\\/www.edelalon.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/edel-alon-logobl.png\",\"width\":136,\"height\":80,\"caption\":\"Edel Alon\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.edelalon.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/edel-alon-logobl.png\"},\"description\":\"Edel-Ryan Alon is a starving musician, failed artist, connoisseur of fine foods, aspiring entrepreneur, husband, father of two, geek by day, cook by night, and an all around great guy.\",\"sameAs\":[\"https:\\\/\\\/edelalon.com\"],\"url\":\"https:\\\/\\\/www.edelalon.com\\\/blog\\\/author\\\/edelalon\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PHP Code to Display Year &#8226; Edel Alon","description":"Hello, we have well thought out reading topics on technology, leadership, project management, food, weddings, and tools to help your daily life. Need some Excel tips or wedding planning advice? Read now and don't forget to comment.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.edelalon.com\/blog\/2011\/11\/php-code-to-display-year\/","og_locale":"en_US","og_type":"article","og_title":"PHP Code to Display Year &#8226; Edel Alon","og_description":"Hello, we have well thought out reading topics on technology, leadership, project management, food, weddings, and tools to help your daily life. Need some Excel tips or wedding planning advice? Read now and don't forget to comment.","og_url":"https:\/\/www.edelalon.com\/blog\/2011\/11\/php-code-to-display-year\/","og_site_name":"Edel Alon","article_published_time":"2011-11-28T05:17:08+00:00","article_modified_time":"2024-10-05T08:21:12+00:00","og_image":[{"width":200,"height":173,"url":"https:\/\/www.edelalon.com\/blog\/wp-content\/uploads\/2009\/04\/excelcalendar.jpg","type":"image\/jpeg"}],"author":"Edel Alon","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Edel Alon","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.edelalon.com\/blog\/2011\/11\/php-code-to-display-year\/#article","isPartOf":{"@id":"https:\/\/www.edelalon.com\/blog\/2011\/11\/php-code-to-display-year\/"},"author":{"name":"Edel Alon","@id":"https:\/\/www.edelalon.com\/blog\/#\/schema\/person\/aaf86bfa75efb59a5f0855c63e330e42"},"headline":"PHP Code to Display Year","datePublished":"2011-11-28T05:17:08+00:00","dateModified":"2024-10-05T08:21:12+00:00","mainEntityOfPage":{"@id":"https:\/\/www.edelalon.com\/blog\/2011\/11\/php-code-to-display-year\/"},"wordCount":69,"commentCount":0,"publisher":{"@id":"https:\/\/www.edelalon.com\/blog\/#\/schema\/person\/aaf86bfa75efb59a5f0855c63e330e42"},"image":{"@id":"https:\/\/www.edelalon.com\/blog\/2011\/11\/php-code-to-display-year\/#primaryimage"},"thumbnailUrl":"https:\/\/www.edelalon.com\/blog\/wp-content\/uploads\/2009\/04\/excelcalendar.jpg","keywords":["coding"],"articleSection":["Technology"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.edelalon.com\/blog\/2011\/11\/php-code-to-display-year\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.edelalon.com\/blog\/2011\/11\/php-code-to-display-year\/","url":"https:\/\/www.edelalon.com\/blog\/2011\/11\/php-code-to-display-year\/","name":"PHP Code to Display Year &#8226; Edel Alon","isPartOf":{"@id":"https:\/\/www.edelalon.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.edelalon.com\/blog\/2011\/11\/php-code-to-display-year\/#primaryimage"},"image":{"@id":"https:\/\/www.edelalon.com\/blog\/2011\/11\/php-code-to-display-year\/#primaryimage"},"thumbnailUrl":"https:\/\/www.edelalon.com\/blog\/wp-content\/uploads\/2009\/04\/excelcalendar.jpg","datePublished":"2011-11-28T05:17:08+00:00","dateModified":"2024-10-05T08:21:12+00:00","description":"Hello, we have well thought out reading topics on technology, leadership, project management, food, weddings, and tools to help your daily life. Need some Excel tips or wedding planning advice? Read now and don't forget to comment.","breadcrumb":{"@id":"https:\/\/www.edelalon.com\/blog\/2011\/11\/php-code-to-display-year\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.edelalon.com\/blog\/2011\/11\/php-code-to-display-year\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.edelalon.com\/blog\/2011\/11\/php-code-to-display-year\/#primaryimage","url":"https:\/\/www.edelalon.com\/blog\/wp-content\/uploads\/2009\/04\/excelcalendar.jpg","contentUrl":"https:\/\/www.edelalon.com\/blog\/wp-content\/uploads\/2009\/04\/excelcalendar.jpg","width":200,"height":173},{"@type":"BreadcrumbList","@id":"https:\/\/www.edelalon.com\/blog\/2011\/11\/php-code-to-display-year\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.edelalon.com\/blog\/"},{"@type":"ListItem","position":2,"name":"PHP Code to Display Year"}]},{"@type":"WebSite","@id":"https:\/\/www.edelalon.com\/blog\/#website","url":"https:\/\/www.edelalon.com\/blog\/","name":"Edel Alon","description":"Projects, Tools, Craft, Food, Music, and Other Stuff","publisher":{"@id":"https:\/\/www.edelalon.com\/blog\/#\/schema\/person\/aaf86bfa75efb59a5f0855c63e330e42"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.edelalon.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.edelalon.com\/blog\/#\/schema\/person\/aaf86bfa75efb59a5f0855c63e330e42","name":"Edel Alon","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.edelalon.com\/blog\/wp-content\/uploads\/2017\/09\/edel-alon-logobl.png","url":"https:\/\/www.edelalon.com\/blog\/wp-content\/uploads\/2017\/09\/edel-alon-logobl.png","contentUrl":"https:\/\/www.edelalon.com\/blog\/wp-content\/uploads\/2017\/09\/edel-alon-logobl.png","width":136,"height":80,"caption":"Edel Alon"},"logo":{"@id":"https:\/\/www.edelalon.com\/blog\/wp-content\/uploads\/2017\/09\/edel-alon-logobl.png"},"description":"Edel-Ryan Alon is a starving musician, failed artist, connoisseur of fine foods, aspiring entrepreneur, husband, father of two, geek by day, cook by night, and an all around great guy.","sameAs":["https:\/\/edelalon.com"],"url":"https:\/\/www.edelalon.com\/blog\/author\/edelalon\/"}]}},"_links":{"self":[{"href":"https:\/\/www.edelalon.com\/blog\/wp-json\/wp\/v2\/posts\/2728","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.edelalon.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.edelalon.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.edelalon.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.edelalon.com\/blog\/wp-json\/wp\/v2\/comments?post=2728"}],"version-history":[{"count":0,"href":"https:\/\/www.edelalon.com\/blog\/wp-json\/wp\/v2\/posts\/2728\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.edelalon.com\/blog\/wp-json\/wp\/v2\/media\/547"}],"wp:attachment":[{"href":"https:\/\/www.edelalon.com\/blog\/wp-json\/wp\/v2\/media?parent=2728"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.edelalon.com\/blog\/wp-json\/wp\/v2\/categories?post=2728"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.edelalon.com\/blog\/wp-json\/wp\/v2\/tags?post=2728"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}