popular posts: fix date range handling.

* Fix the next button for the weekly timescale to jump to the next week,
  not the next day.
* Show the start and end dates for the weekly timescale.
* Use `Time.zone.today` instead of `Date.today` to respect the user's
  timezone setting.
This commit is contained in:
evazion
2020-02-23 16:11:35 -06:00
parent 76259265de
commit e8590afa6d
3 changed files with 16 additions and 18 deletions

View File

@@ -11,7 +11,7 @@
<% if @scale == "day" %>
<%= @date.strftime("%B %d, %Y") %>
<% elsif @scale == "week" %>
<%= @date.strftime("Week of %B %d, %Y") %>
<%= @min_date.strftime("%B %d, %Y") %> - <%= @max_date.strftime("%B %d, %Y") %>
<% elsif @scale == "month" %>
<%= @date.strftime("%B %Y") %>
<% end %>