fix milestones with no due dates
This commit is contained in:
parent
77b8f7c6c6
commit
bd3877f73d
|
@ -29,12 +29,14 @@ Issues =
|
|||
|
||||
# Convert GitHub ISO 8601 to JS timestamp at the beginning of UTC day!'
|
||||
dateToTime: (date) ->
|
||||
# Some milestones do not have due dates.
|
||||
return 0 unless date?
|
||||
# Add miliseconds and create `Date`.
|
||||
date = new Date(date[0...date.length - 1] + '.000' + date.charAt date.length-1)
|
||||
# Move to the beginning of the day (at 9am BST, 8am GMT, so we do not worry about time shifts).
|
||||
date = new Date date.getFullYear(), date.getMonth(), date.getDate(), 9
|
||||
# Return timestamp.
|
||||
date.getTime();
|
||||
date.getTime()
|
||||
|
||||
# Format issues for display in a listing.
|
||||
format: (issue) ->
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "github-burndown-chart",
|
||||
"version": "0.1.2",
|
||||
"version": "0.1.3",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"coffee-script": "1.3.3",
|
||||
|
|
Loading…
Reference in New Issue