{"id":79168,"date":"2013-11-28T09:40:28","date_gmt":"2013-11-28T17:40:28","guid":{"rendered":"https:\/\/tri.be\/support\/forums\/topic\/how-to-change-the-same-year-date-format-for-events-in-same-year-v3-2\/"},"modified":"2013-11-28T09:40:28","modified_gmt":"2013-11-28T17:40:28","slug":"how-to-change-the-same-year-date-format-for-events-in-same-year-v3-2","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-change-the-same-year-date-format-for-events-in-same-year-v3-2\/","title":{"rendered":"How to Change the Same Year Date Format for Events in Same year (v3.2)"},"content":{"rendered":"<p>Hi there,<br \/>\nI&#8217;m posting this for my client as I&#8217;m the developer for their site (stephberg@webfocusdesign.com)<\/p>\n<p>I need to change the same year date format for events and I&#8217;ve read the discussion in this thread:<br \/>\nhttps:\/\/tri.be\/support\/forums\/topic\/changing-date-format-in-v3\/<br \/>\nand I&#8217;ve searched for details in the docs and elsewhere but, I couldn&#8217;t find the actual details I need.<\/p>\n<p>In the tribe_events_event_schedule_details() function of public\/general.php, the $settings array sets a &#8216;same_year_format&#8217; variable to a hard coded value of &#8216;F j&#8217; which is then assigned to $format when an event is in the current year. That&#8217;s a bad idea on many levels (both hard coding the value AND assuming that displaying the year in a same year event is unnecessary), especially for non English sites as the hard coded value uses the English formatting but, more on that below. For now, I modified the general.php file and changed that variable&#8217;s value directly but I would like to override that variable value or that array in my theme&#8217;s functions.php to be able to update TEC and TECP without loosing that change. I just have no idea what code should go in the filter to just override that variable. I have created a filter and tried a bunch of things in it but in didn&#8217;t work.<\/p>\n<p>I did not find any indication in the docs of how that filter should be written to override that &#8216;same_year_format&#8217; variable so, any pointers would be much appreciated.<\/p>\n<p>On principle, whether the year is displayed for current year events or not should be an option in the plugin&#8217;s settings. Assuming it&#8217;s not needed or useful is wrong IMO. In terms of UX, removing context like this is never a good idea to begin with and hard coding values this directly tied to localized data is even worse IMO. So I really believe this logic should be revised.<\/p>\n<p>Thank you!<\/p>\n<p>St\u00e9phane Bergeron<br \/>\nWebfocus Design<br \/>\n@pixelyzed \/ @webfocusdesign<\/p>\n","protected":false},"template":"","class_list":["post-79168","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Change the Same Year Date Format for Events in Same year (v3.2) -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-change-the-same-year-date-format-for-events-in-same-year-v3-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Change the Same Year Date Format for Events in Same year (v3.2) -\" \/>\n<meta property=\"og:description\" content=\"Hi there, I&#8217;m posting this for my client as I&#8217;m the developer for their site (stephberg@webfocusdesign.com) I need to change the same year date format for events and I&#8217;ve read the discussion in this thread: https:\/\/tri.be\/support\/forums\/topic\/changing-date-format-in-v3\/ and I&#8217;ve searched for details in the docs and elsewhere but, I couldn&#8217;t find the actual details I need. [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-change-the-same-year-date-format-for-events-in-same-year-v3-2\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-change-the-same-year-date-format-for-events-in-same-year-v3-2\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-change-the-same-year-date-format-for-events-in-same-year-v3-2\/\",\"name\":\"How to Change the Same Year Date Format for Events in Same year (v3.2) -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2013-11-28T17:40:28+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-change-the-same-year-date-format-for-events-in-same-year-v3-2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-change-the-same-year-date-format-for-events-in-same-year-v3-2\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-change-the-same-year-date-format-for-events-in-same-year-v3-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"How to Change the Same Year Date Format for Events in Same year (v3.2)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Change the Same Year Date Format for Events in Same year (v3.2) -","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:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-change-the-same-year-date-format-for-events-in-same-year-v3-2\/","og_locale":"en_US","og_type":"article","og_title":"How to Change the Same Year Date Format for Events in Same year (v3.2) -","og_description":"Hi there, I&#8217;m posting this for my client as I&#8217;m the developer for their site (stephberg@webfocusdesign.com) I need to change the same year date format for events and I&#8217;ve read the discussion in this thread: https:\/\/tri.be\/support\/forums\/topic\/changing-date-format-in-v3\/ and I&#8217;ve searched for details in the docs and elsewhere but, I couldn&#8217;t find the actual details I need. [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-change-the-same-year-date-format-for-events-in-same-year-v3-2\/","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-change-the-same-year-date-format-for-events-in-same-year-v3-2\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-change-the-same-year-date-format-for-events-in-same-year-v3-2\/","name":"How to Change the Same Year Date Format for Events in Same year (v3.2) -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2013-11-28T17:40:28+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-change-the-same-year-date-format-for-events-in-same-year-v3-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-change-the-same-year-date-format-for-events-in-same-year-v3-2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-change-the-same-year-date-format-for-events-in-same-year-v3-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"How to Change the Same Year Date Format for Events in Same year (v3.2)"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/79168","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/79168\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=79168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}