Skip to content

Commit 336b991

Browse files
author
Matt Berther
committed
Merge branch 'shashankbaluni-master'
2 parents 9e01966 + 8473885 commit 336b991

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,14 @@ var DailyRotateFile = module.exports = function (options) {
142142
};
143143

144144
this.getFormattedDate = function () {
145+
// update the year, month, date... variables
146+
this._year = this._getTime('year');
147+
this._month = this._getTime('month');
148+
this._date = this._getTime('date');
149+
this._hour = this._getTime('hour');
150+
this._minute = this._getTime('minute');
151+
this._weekday = weekday[this._getTime('day')];
152+
145153
var flags = {
146154
yy: String(this._year).slice(2),
147155
yyyy: this._year,

0 commit comments

Comments
 (0)