Last updated: 3 months ago

Have you ever come across a situation where you need to change the date format on EventON eventTOP?

Well, you are in luck, the below code snippet will guide you on how to customize your code to show the date in any format you desire.

CODE Explained:

We are hooking into “evo_eventtop_day_block” filter and altering the ‘date’ value of the data array to match to the format you want.

The $object that is also passed into this filter contains: start (array), color, day_name, html, show year, yearlong (boolean) as properties. These properties are arrays and strings.

Start property sends a huge array of various event start date items. These items are broken down into individual date items such as month, day, name etc. In the example above, we used “n” which represents the month as an integer and “j” which represents the date as an integer. You can refer to the date format string at http://php.net/manual/en/function.date.php for more information.

Using this information, allows you to easily customize the look of eventTop date format. The above example will look like the format below:

Ready to setup your calendar?

Buy EventON Now