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
* Date Phrase plugin
- LornaCraig
- Megastar
- Posts: 2991
- Joined: 11 Jan 2005 17:36
- Family Historian: V7
- Location: Oxfordshire, UK
Date Phrase plugin
Lorna
- PeterR
- Megastar
- Posts: 1129
- Joined: 10 Jul 2006 16:55
- Family Historian: V7
- Location: Northumberland, UK
Date Phrase plugin
The first line in the for ... do ... end loop is:According to the Help file example, this line should be: If you use this line instead, the Plugin does return the correct result. I think there may be another bug in that 'nill' is used instead of 'nil'.
Code: Select all
pi:MoveTo(pi,strTypeDesc)Code: Select all
pi:MoveToFirstRecord(strTypeDesc)
Peter Richmond (researching Richmond, Bulman, Martin, Driscoll, Baxter, Hall, Dales, Tyrer)
- LornaCraig
- Megastar
- Posts: 2991
- Joined: 11 Jan 2005 17:36
- Family Historian: V7
- Location: Oxfordshire, UK
- Jane
- Site Admin
- Posts: 8441
- Joined: 01 Nov 2002 15:00
- Family Historian: V7
- Location: Somerset, England
- Contact:
Date Phrase plugin
Good Catch.
I'll fix the master copy when I get a moment.
Pre-Beta some of the functions got changed around and I think that's a hang over I missed.
edit: done
I'll fix the master copy when I get a moment.
Pre-Beta some of the functions got changed around and I think that's a hang over I missed.
edit: done
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
- Jane
- Site Admin
- Posts: 8441
- Joined: 01 Nov 2002 15:00
- Family Historian: V7
- Location: Somerset, England
- Contact:
Date Phrase plugin
Lorna,
Don't forget you can use a Plugin to fix the problems pretty easily, if you don't want to edit them manually, you just add them into the main loop
So for example if you have ABT. 1905 you can fix it using the code below.
Don't forget you can use a Plugin to fix the problems pretty easily, if you don't want to edit them manually, you just add them into the main loop
So for example if you have ABT. 1905 you can fix it using the code below.
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
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."