I am creating a browser-based single-page app which will be retrieving information as JSON from an API that I control. The API will often return large, complex object graphs (objects within objects, etc). Many of the objects contain "date-only fields" (i.e. fields for which only the date is relevant) - that is, if a field is set to "April 1, 2015" it should always appear to the user as April 1, regardless of the user's timezone, daylight savings time, etc. Of course, the API server's timezone should have no effect on the displayed dates (and may be assumed to be fixed forever).
In the server-side API code, I can easily identify these "date-only fields" and have full flexibility to pre-process them in any way before sending them to the client.
On the client, these dates will be used in a variety of ways (displayed in textboxes and labels, passed to AngularJS 'date' filter, passed to 3rd-party date-picker controls, etc). As far as I can tell, the lowest common denominator here is the Date() constructor - if the browser's JavaScript Date() constructor will correctly interpret the date, everything else will work fine.
My first thought, therefore, was to pre-process these date-only fields, to get them into a format that the Date() constructor will interpret correctly. It turns out that this is not trivial to find such a format (see my related question here: JavaScript date-only format guaranteed to be interpreted as local time in modern browsers )
My other thought was to post-process the API response on the client side (essentially, to manually parse all the string dates coming back from the API using e.g. moment.js), but I'd like to avoid the client-side perf impact of combing through a huge object graph and finding all dates.
I am guessing this is not a new or particularly unique problem. Are there other solutions that I'm overlooking? How do I communicate date-only fields from the server to browser clients while keeping the date timezone-agnostic?