Skip to content

Commit

Permalink
Removed '0 second' check
Browse files Browse the repository at this point in the history
  • Loading branch information
nuclearpidgeon committed Jul 24, 2014
1 parent d0359a5 commit c0a79a9
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions ics.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,8 @@ var ics = function() {
var end_minutes = ("00" + (end_date.getMinutes().toString())).slice(-2);
var end_seconds = ("00" + (end_date.getMinutes().toString())).slice(-2);

// Since some calendars don't add 0 second events, we need to remove time if there is none...
var start_time = '';
var end_time = '';
if (start_minutes + start_seconds + end_minutes + end_seconds != 0) {
start_time = 'T' + start_hours + start_minutes + start_seconds;
end_time = 'T' + end_hours + end_minutes + end_seconds;
}
var start_time = 'T' + start_hours + start_minutes + start_seconds;
var end_time = 'T' + end_hours + end_minutes + end_seconds;

var start = start_year + start_month + start_day + start_time;
var end = end_year + end_month + end_day + end_time;
Expand Down

0 comments on commit c0a79a9

Please sign in to comment.