Skip to content

Commit

Permalink
Remove date assumptions
Browse files Browse the repository at this point in the history
  • Loading branch information
khornberg committed Nov 22, 2013
1 parent ab6214b commit 0d78b46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ics.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ var ics = function() {
var end_date = new Date(stop);

var start_year = ('0000' + (start_date.getFullYear().toString())).slice(-4);
var start_month = ('00' + (start_date.getMonth().toString())).slice(-2) + 1;
var start_month = ('00' + (start_date.getMonth().toString())).slice(-2);
var start_day = ('00' + (start_date.getDate().toString())).slice(-2);
var start = start_year + (Number(start_month)+1) + start_day;

var end_year = ('0000' + (end_date.getFullYear().toString())).slice(-4);
var end_month = ('00' + (end_date.getMonth().toString())).slice(-2);
var end_day = ('00' + ((end_date.getDate()+1).toString())).slice(-2);
var end_day = ('00' + (end_date.getDate().toString())).slice(-2);
var end = end_year + (Number(end_month)+1) + end_day;

var calendarEvent = [
Expand Down

0 comments on commit 0d78b46

Please sign in to comment.