Skip to content

Commit

Permalink
🐞 Fixed month page generation error due to missing feb 29th. Changed …
Browse files Browse the repository at this point in the history
…timespan from 1 month to 31 days. Resolves #16
  • Loading branch information
neoground committed Mar 29, 2021
1 parent 74787f6 commit 399f687
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# Changelog

## 1.11 (2021-03-29)
## 1.11 (2021-03-30)

### Added

- The theme mode (auto / light / dark) can now be changed
in the settings

### Fixed

- Month page will get generated again. The timespan
"1 month" didn't work due to missing Feb 29th this year.
Now the month page shows a timespan of 31 days.


## 1.10 (2021-03-27)
Expand Down
4 changes: 2 additions & 2 deletions src/month.html.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
#set current_interval = int($Extras.Charts.month_rain_timespan)
#end if

#for $record in $span($month_delta=1).spans(interval=current_interval)
#for $record in $span($day_delta=31).spans(interval=current_interval)
#try
#set val = $getattr($record, $name)
#set data = $getattr($val, $column).format(add_label=False, localize=False, None_string="null")
Expand Down Expand Up @@ -347,7 +347,7 @@ new ApexCharts(document.querySelector('#$id'), {
};

var raw_data = [
#for $record in $span($month_delta=1).spans(interval=int($Extras.Charts.month_timespan))
#for $record in $span($day_delta=31).spans(interval=int($Extras.Charts.month_timespan))
{
'dir': "$record.windDir.avg.raw",
'speed': "$record.windSpeed.avg.raw",
Expand Down

0 comments on commit 399f687

Please sign in to comment.