API Docs for: 1.0.0
Show:

File: scotts\widgets\gsp_calendar_summary\client.js

function _controller($scope) {
	/**
	 * Methods for formatting event data for display, such as dates and processing
	 * them for display depending on flags such as "all_day".
	 * @class GSPCalendarSummary.Client
	 * @constructor
	 * @extends Widget.Client
	 * @author Alexander Anderson (cwt_alexander)
	 * @module Widgets
	 */
	
	/**
	 * 
	 * @method getEventDate
	 * @param {Object | PortalCalendarEvent} event The event data from which the date
	 * 		data is being pulled for display.
	 * @param {String} field The date field to pull for display. This lets Start and
	 * 		End be separated with some ease.
	 */
	$scope.getEventDate = function(event, field) {
		var date = new Date(event[field]),
			display;

		display = date.toLocaleDateString();
		if(!event.u_all_day_event) {
			display += " " + date.toLocaleTimeString();
		}
		
		return display;
	};
}