Skip to content

Instantly share code, notes, and snippets.

@jacobmischka
Last active November 14, 2016 18:55
Show Gist options
  • Save jacobmischka/b8cbf80e81f0a441d93fa28c81c71382 to your computer and use it in GitHub Desktop.
Save jacobmischka/b8cbf80e81f0a441d93fa28c81c71382 to your computer and use it in GitHub Desktop.
split
const sameDay = this.props.event.start.isSame(this.props.event.end, 'day');
const sameDayAllDay = this.props.event.allDay && this.props.event.start
.isSame(this.props.event.end.clone().subtract(1, 'day'));
if(sameDay || sameDayAllDay){
const dateFormat = 'll';
return this.props.event.start.format(dateFormat);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment