Skip to content

Commit 7b06dab

Browse files
authored
Merge pull request #3 from ndu2/develop
Develop fix month (is 0 based)
2 parents 8a93422 + 6eeea9d commit 7b06dab

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/models/hasTimes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class hasTimes extends Base {
2424
*/
2525
createTime(time, created_at) {
2626
var date = new Date(created_at);
27-
var spentAt = date.getUTCFullYear()+"-"+date.getUTCMonth()+"-"+date.getUTCDate();
27+
var spentAt = date.getUTCFullYear()+"-"+date.getUTCMonth()+1+"-"+date.getUTCDate();
2828
return this.post(`projects/${this.data.project_id}/${this._type}/${this.iid}/notes`, {
2929
body: '/spend '+Time.toHumanReadable(time, this.config.get('hoursPerDay'), '[%sign][%days>d ][%hours>h ][%minutes>m ][%seconds>s]'+' '+spentAt),
3030
});

src/output/invoice.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@ class invoice extends Base {
3333
return "";
3434
}
3535
if(!Array.isArray(data)) {
36-
return data;
36+
return data.replace(/_/g, " ");
3737
}
38-
return data.join(separator);
38+
let data2 = [];
39+
data.forEach(el => data2.push(this.concat(el, separator)));
40+
return data2.join(separator);
3941
}
4042

4143
makeStats() {

0 commit comments

Comments
 (0)