Extraneous Markup in json results for dates in 2025

Hello,
I have noticed that events in 2025 have a “date” format that is different from events in 2024. Specifically, I am noticing this in json results from the api.

From example, at this endpoint, which contains events from 2024 and 2025, https://events.uconn.edu/live/json/v2/events/response_fields/location,summary/group/philosophy%20department/start_date/today/end_date/12%20months, events from 2024 have their dates written as “date”: “November 18” whereas events from 2025 have their dates written as “date”: “January 25<span class="lw_date_year">, 2025”

I have some plugin code that is utilizing this date field and the span tag is throwing things off. I am wondering if that is something LW can remove on their end (leaving just the year).

If not, I understand — just trying to understand the long term plans for this before I modify our plugin to account for it.

Thanks!

Hi Janet,

Sure – that span gets automatically added by LW to wrap years that are different than the current year, when using the default date format. However, you can override it on a per-widget or per-request basis by setting the date_format argument. A basic widget format like “%F %j, %Y”, URL-encoded, would look like this: /date_format/%25F%20%25j,%20%25Y

or in context, https://events.uconn.edu/live/json/v2/events/response_fields/location,summary/date_format/%25F%20%25j,%20%25Y/group/philosophy%20department/start_date/today/end_date/12%20months

Hope this helps! There are options for configuring something site-wide to change this as a default, but hopefully for an API integration that’s expecting a precise date format that’s the same across each event, this will get you what you need.

1 Like

Thank you for your help, as always, Karl! Very helpful explanation!