Last active
December 7, 2015 23:04
-
-
Save m4tx/643f0d37591197ca0b20 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function() { | |
var pad = function(num) { | |
if (num < 10) { | |
return '0' + num; | |
} | |
return num; | |
}; | |
var dateToString = function(date) { | |
return date.getFullYear() + '-' | |
+ pad(date.getMonth() + 1) | |
+ '-' + pad(date.getDate()); | |
}; | |
var first = new Date(); | |
first.setDate(1); | |
var start = dateToString(first); | |
var last = new Date(); | |
last.setMonth(last.getMonth() + 1); | |
last.setDate(0); | |
var end = dateToString(last); | |
var url = 'https://hubstaff.com/reports/my/custom?utf8=%E2%9C%93&group_by=date&commit=Apply&report_filters%5Bsum_date_ranges%5D=1&date=' + start + '&date_end=' + end; | |
document.location = url; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment