Skip to content

Commit

Permalink
Use ISO standard as the start of the week
Browse files Browse the repository at this point in the history
  • Loading branch information
MusikAnimal committed Jan 16, 2017
1 parent efda8f5 commit cffe744
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 18 deletions.
10 changes: 5 additions & 5 deletions javascripts/shared/pv_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ class PvConfig {
constructor() {
let self = this;
const formatXAxisTick = value => {
const dayOfWeek = moment(value, this.dateFormat).weekday();
if (dayOfWeek % 7) {
return value;
} else {
const dayOfWeek = moment(value, this.dateFormat).isoWeekday();
if (dayOfWeek === 1) {
return `• ${value}`;
} else {
return value;
}
};

Expand Down Expand Up @@ -213,7 +213,7 @@ class PvConfig {
minDate: moment('2015-07-01').startOf('day'),
maxDate,
specialRanges: {
'last-week': [moment().subtract(1, 'week').startOf('week'), moment().subtract(1, 'week').endOf('week')],
'last-week': [moment().subtract(1, 'isoweek').startOf('isoweek'), moment().subtract(1, 'isoweek').endOf('isoweek')],
'this-month': [moment().startOf('month'), moment().startOf('month').isAfter(maxDate) ? moment().startOf('month') : maxDate],
'last-month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')],
'this-year': [moment().startOf('year'), moment().startOf('year').isAfter(maxDate) ? moment().startOf('year') : maxDate],
Expand Down
4 changes: 2 additions & 2 deletions public_html/application.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions public_html/langviews/application.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions public_html/massviews/application.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions public_html/meta/application.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions public_html/redirectviews/application.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions public_html/siteviews/application.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public_html/topviews/application.js

Large diffs are not rendered by default.

0 comments on commit cffe744

Please sign in to comment.