File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -30,17 +30,25 @@ local AgendaItem = {}
3030function AgendaItem :new (headline_date , headline , date , index )
3131 local opts = {}
3232 opts .headline_date = headline_date
33- opts .real_date = headline_date : apply_repeater_until ( date )
33+ opts .real_date = headline_date
3434 opts .headline = headline
3535 opts .date = date
3636 opts .index = index or 1
3737 opts .is_valid = false
3838 opts .is_today = date :is_today ()
39- opts .is_same_day = headline_date :is_same (date , ' day' ) or headline_date :repeats_on (date )
39+ opts .repeats_on_date = false
40+ opts .is_same_day = headline_date :is_same (date , ' day' )
41+ if not opts .is_same_day then
42+ opts .repeats_on_date = headline_date :repeats_on (date )
43+ opts .is_same_day = opts .repeats_on_date
44+ end
4045 opts .is_in_date_range = headline_date :is_none () and headline_date :is_in_date_range (date )
4146 opts .date_range_days = headline_date :get_date_range_days ()
4247 opts .label = ' '
4348 opts .highlights = {}
49+ if opts .repeats_on_date then
50+ opts .real_date = opts .headline_date :apply_repeater_until (opts .date )
51+ end
4452 setmetatable (opts , self )
4553 self .__index = self
4654 opts :_process ()
Original file line number Diff line number Diff line change @@ -493,7 +493,7 @@ function Date:subtract(opts)
493493end
494494
495495--- @param date Date
496- --- @param span string
496+ --- @param span ? string
497497--- @return boolean
498498function Date :is_same (date , span )
499499 if not span then
You can’t perform that action at this time.
0 commit comments