Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions assets/js/dashboard/stats-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ type QueryInclude = {
imports: boolean
imports_meta: boolean
time_labels: boolean
partial_time_labels: boolean
compare: IncludeCompare
compare_match_day_of_week: boolean
present_index?: boolean
}

export type ReportParams = {
Expand Down Expand Up @@ -48,6 +50,7 @@ export function createStatsQuery(
imports: dashboardState.with_imported,
imports_meta: reportParams.include?.imports_meta || false,
time_labels: reportParams.include?.time_labels || false,
partial_time_labels: reportParams.include?.partial_time_labels || false,
compare: createIncludeCompare(dashboardState),
compare_match_day_of_week: dashboardState.match_day_of_week
}
Expand Down
10 changes: 1 addition & 9 deletions assets/js/dashboard/stats/graph/date-formatter.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
import { parseUTCDate, formatMonthYYYY, formatDayShort } from '../../util/date'

const browserDateFormat = Intl.DateTimeFormat(navigator.language, {
hour: 'numeric'
})

const is12HourClock = function () {
return browserDateFormat.resolvedOptions().hour12
}
import { parseUTCDate, formatMonthYYYY, formatDayShort, is12HourClock } from '../../util/date'

const monthIntervalFormatter = {
long(isoDate, options) {
Expand Down
Loading
Loading