USD Logo MySanDiego | Libraries | Torero Store | Find People | A to Z Index | Resources | Jobs
 Prospective Students | Current Students | Alumni, Parents & Friends | Faculty & Employees | Visitors | International
About USDAdmissionsAcademicsNews and EventsAdministrationAthleticsGiving

Sort calendar

Sort calendar

By default, the events will be sorted by your datefield, in the appropriate order for the requested calendar. Often, you’ll need it also to be sorted by something else, such as time of day if you keep that in a separate field, or by some titular information.

$myCalendar->sort("last_name");

This will sort by the “last_name” field. You can also specify a list of fields:

$myCalendar->sort("last_name, first_name");

This sorts by last name and then by first name.

The sort will always sort by date first, and then by any additional sort fields you specify.