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
133
134
135
|
# File 'lib/wikidata_position_history/checks.rb', line 133
def headline
comparable? ? 'Date overlap' : 'Date precision'
end
|
#possible_explanation ⇒ Object
137
138
139
|
# File 'lib/wikidata_position_history/checks.rb', line 137
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
124
125
126
127
128
129
130
131
|
# File 'lib/wikidata_position_history/checks.rb', line 124
def problem?
return false unless later
ends = current.end_date or return false
ends > later.start_date
rescue ArgumentError
true
end
|