Date Phrase plugin
Posted: 31 Jul 2011 13:46
Running the Find Date Phrase plugin produces 'No Date Phrases Found'. But I know there are some. What am I doing wrong?
Lorna
ID:5319
Lorna
ID:5319
Helping Family Historian users since 2002
https://fhug.org.uk/forum/
Code: Select all
pi:MoveTo(pi,strTypeDesc)Code: Select all
pi:MoveToFirstRecord(strTypeDesc)
Code: Select all
-- Clean up date
iYear = nil
iYear = tonumber(string.match(strPhrase,'%d%d%d%d'))
print(strPhrase,iYear)
if iYear ~= nill then
-- Got a Year
if string.find(strPhrase,'ABT.') then
dpDatePoint:SetValue(iYear)
dtDate:SetSimpleDate(dpDatePoint,'approximate')
fhSetValueAsDate(pi,dtDate)
end
end