Skip to content

Commit

Permalink
Fix the off-by-one error on day-of-months
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Sep 1, 2010
1 parent e35ddf0 commit 5e92302
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/wheat/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ var Helpers = {
case "%F": // A full textual representation of a month like March
value = monthsInYear[date.getMonth()]; break;
case "%d": // Day of the month, 2 digits with leading zeros
value = pad(date.getDate() + 1); break;
value = pad(date.getDate()); break;
case "%j": // Day of the month without leading zeros
value = pad(date.getDate() + 1); break;
value = date.getDate(); break;
case "%l": // A full textual representation of the day of the week
value = daysInWeek[date.getDay()]; break;
case "%H": // 24-hour format of an hour with leading zeros
Expand Down

0 comments on commit 5e92302

Please sign in to comment.