Class: WikidataPositionHistory::Check::Overlap
Overview
Does the end date overlap with the successor’s start date?
Instance Method Summary
collapse
#explanation, #initialize
Instance Method Details
#headline ⇒ Object
165
166
167
|
# File 'lib/wikidata_position_history/checks.rb', line 165
def headline
comparable? ? 'Date overlap' : 'Date precision'
end
|
#possible_explanation ⇒ Object
169
170
171
|
# File 'lib/wikidata_position_history/checks.rb', line 169
def possible_explanation
"#{current.item} has a {{P|582}} of #{current.end_date}, which #{overlap_explanation} the {{P|580}} of #{later.start_date} for #{later.item}"
end
|
#problem? ⇒ Boolean
154
155
156
157
158
159
160
161
162
163
|
# File 'lib/wikidata_position_history/checks.rb', line 154
def problem?
return false unless later
next_starts = later.start_date or return false
ends = current.end_date or return false
ends > next_starts
rescue ArgumentError
true
end
|