Add a diary frequency option (#884)

* Add diary_frequency parameter to wikis

* Create diary entries according to the frequency

* Update date validation

* Use timestamps, extract abstract yesterday and today as day-long periods

* Revert old changes

* Remove debug log

* Start the week any day

* Add monthly and yearly options

* Cleanup
This commit is contained in:
Jérémy Caldas
2020-07-21 19:21:43 +02:00
committed by GitHub
parent 45b7515b88
commit a3be479d5a
4 changed files with 86 additions and 7 deletions

View File

@ -1908,10 +1908,11 @@ Example of diary section: >
* [[2011-12-09]]
* [[2011-12-08]]
The diary can be used with a frequency other than daily. See the appropriate
per-wiki options.
See |g:vimwiki_diary_months| if you would like to rename months.
------------------------------------------------------------------------------
Calendar integration *vimwiki-calendar*
@ -2451,6 +2452,35 @@ Possible values:
When the value is >= 1, the primary caption of each diary page is set to the
first header read from that page if it is the unique lowest-level header.
*vimwiki-option-diary_frequency*
------------------------------------------------------------------------------
Key Default value~
diary_frequency daily
Description~
Controls the diary frequency used to create the date for which a diary entry
is created.
Possible values:
daily: Create a diary entry dated for each day.
weekly: Create a diary entry dated for the beginning of each week.
monthly: Create a diary entry dated for the beginning of each month.
yearly: Create a diary entry dated for the beginning of each year.
*vimwiki-option-diary_start_week_day*
------------------------------------------------------------------------------
Key Default value~
diary_start_week_day monday
Description~
Set the day to begin each week.
Possible values:
monday, tuesday, wednesday, thursday, friday, saturday, sunday
*vimwiki-option-custom_wiki2html*
------------------------------------------------------------------------------
Key Default value~
@ -3681,6 +3711,7 @@ New:~
* PR #47: Optimize table formatting for large tables.
* PR #857: Make default template responsive
* PR #879: Generate links when diary & wiki dir are the same
* PR #884: Configure diary frequency (daily, weekly, monthly, yearly)
Changed:~
* Issue #796: Rename |:VimwikiGenerateTags| to |:VimwikiGenerateTagLinks|