Skip to content

Instantly share code, notes, and snippets.

@travellingprog
Created September 21, 2014 18:43
Show Gist options
  • Save travellingprog/012e5fdd3ddbf4aff5d3 to your computer and use it in GitHub Desktop.
Save travellingprog/012e5fdd3ddbf4aff5d3 to your computer and use it in GitHub Desktop.
dateString function (continued)
startMonth = startpieces[1];
startDay = startpieces[2];
endMonth = endpieces[1];
endDay = endpieces[2];
var dateString = startMonth + " " + startDay;
if (startMonth !== endMonth || startDay !== endDay) {
dateString += " - "
if (startMonth !== endMonth) {
dateString += endMonth;
}
dateString += endDay;
}
return dateString;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment