Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
pooza committed Jan 2, 2025
1 parent 98df347 commit 1799136
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/lib/tomato_shrieker/source/icalendar_source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def create_entry(event)
event.dtend ||= event.dtstart
start_date = Time.parse(event.dtstart.to_s).getlocal
end_date = Time.parse(event.dtend.to_s).getlocal
return {
data = {
start_date:,
end_date:,
is_today: today?(start_date, end_date),
Expand All @@ -91,6 +91,9 @@ def create_entry(event)
location: fedi_sanitize(event.location),
all_day: event.dtstart.is_a?(Icalendar::Values::Date),
}
# Google Calendarで、終日予定の終了日が1日ずれる。
data[:end_date] -= 1.days if data[:all_day] && (data[:start_date] < data[:end_date])
return data
end

def templates
Expand Down

0 comments on commit 1799136

Please sign in to comment.