summaryrefslogtreecommitdiffstats
path: root/index.js
diff options
context:
space:
mode:
authorPiero Blunda <pieroblunda@gmail.com>2015-09-21 15:43:20 -0300
committerPiero Blunda <pieroblunda@gmail.com>2015-09-21 15:43:20 -0300
commitbfe03d2531d5a44d83c78af8b77e87f169f4621e (patch)
tree472fc672664b7ba50163cf9863099896f0d9c189 /index.js
parentf99ee4ce3b377fa8a2a9c78b571df8a0c39032d7 (diff)
downloadgit-hours-bfe03d2531d5a44d83c78af8b77e87f169f4621e.zip
git-hours-bfe03d2531d5a44d83c78af8b77e87f169f4621e.tar.gz
git-hours-bfe03d2531d5a44d83c78af8b77e87f169f4621e.tar.bz2
Using 4 spaces identation
Diffstat (limited to 'index.js')
-rwxr-xr-xindex.js56
1 files changed, 28 insertions, 28 deletions
diff --git a/index.js b/index.js
index d60f31a..066d912 100755
--- a/index.js
+++ b/index.js
@@ -121,33 +121,33 @@ function parseArgs() {
}
function parseSinceDate(options){
- var justNow, thisPeriod, paramDate;
- switch(options.since){
- case 'tonight':
- justNow = new Date();
- thisPeriod = new Date(justNow.getFullYear(), justNow.getMonth(), justNow.getUTCDate());
- config.since = thisPeriod;
- break;
- case 'yesterday':
- justNow = new Date();
- thisPeriod = new Date(justNow.getFullYear(), justNow.getMonth(), justNow.getUTCDate()-1);
- config.since = thisPeriod;
- break;
- case 'lastweek':
- justNow = new Date();
- thisPeriod = new Date(justNow.getFullYear(), justNow.getMonth(), justNow.getUTCDate()-7);
- config.since = thisPeriod;
- break;
- case 'always':
- break;
- default:
- paramDate = new Date(String(config.since));
- if(paramDate === undefined){
- config.since = 'always';
- }else{
- config.since = paramDate;
- }
- }
+ var justNow, thisPeriod, paramDate;
+ switch(options.since){
+ case 'tonight':
+ justNow = new Date();
+ thisPeriod = new Date(justNow.getFullYear(), justNow.getMonth(), justNow.getUTCDate());
+ config.since = thisPeriod;
+ break;
+ case 'yesterday':
+ justNow = new Date();
+ thisPeriod = new Date(justNow.getFullYear(), justNow.getMonth(), justNow.getUTCDate()-1);
+ config.since = thisPeriod;
+ break;
+ case 'lastweek':
+ justNow = new Date();
+ thisPeriod = new Date(justNow.getFullYear(), justNow.getMonth(), justNow.getUTCDate()-7);
+ config.since = thisPeriod;
+ break;
+ case 'always':
+ break;
+ default:
+ paramDate = new Date(String(config.since));
+ if(paramDate === undefined){
+ config.since = 'always';
+ }else{
+ config.since = paramDate;
+ }
+ }
}
function mergeDefaultsWithArgs(config) {
@@ -276,7 +276,7 @@ function getBranchCommits(branchLatestCommit) {
};
if(commitData.date > config.since || config.since === 'always'){
- commits.push(commitData);
+ commits.push(commitData);
}
});