* Full Form Dates

AS allows faster and more convenient creation of source records for Family Historian.
Post Reply
User avatar
ChrisRead
Famous
Posts: 146
Joined: 10 Mar 2007 17:02
Family Historian: V7
Location: Wells, Somerset, England

Full Form Dates

Post by ChrisRead » 17 Dec 2020 21:59

Hi,

I like to use full form dates in titles for sources e.g. 1st March 1927 or 23rd May 1834 etc. and it would be nice to be able to do this easily as part of the options for configuring the Title Templates.

There isn't a {DAY} sub tag for this format, so I have attempted to cook one up using =IF, =EQUALS and =OR functions. but it's not working correctly as yet. I think it is all correctly nested but I always get the default 'th' regardless rather than a 'st' or 'nd'. I'm not sure if I am miss-using the functions or have misinterpreted the correct use.

Here is what I have tried so, far.
{DATE.DAY}=IF[=OR[=EQUALS[DATE.DAY%1]%=OR[=EQUALS[DATE.DAY%21]%=EQUALS[DATE.DAY%31]]]%st%=IF[=OR[=EQUALS[DATE.DAY%2]%=EQUALS[DATE.DAY%22]]%nd%=IF[=OR[=EQUALS[DATE.DAY%3]%=EQUALS[DATE.DAY%23]]%rd%th]]] {DATE.MONTH.FULL} {YEAR}

Essentially trying to output st when the day is 1, 21 or 31, nd when it is 2 or 22 and rd for 3 or 23.

I'm currently trying simple single functions to see if they work as I have interpreted.
Chris Read
Family Historian and Ancestral Sources user.

Researching the READ family and the myriad other relations that turned up.

User avatar
ChrisRead
Famous
Posts: 146
Joined: 10 Mar 2007 17:02
Family Historian: V7
Location: Wells, Somerset, England

Re: Full Form Dates

Post by ChrisRead » 17 Dec 2020 22:04

Well, I figured out one problem, I was not putting {} around the keys. Doh. :cry:

So, the final solution is
{DAY.DAY}=IF[=OR[=EQUALS[{DATE.DAY}%1]%=OR[=EQUALS[{DATE.DAY}%21]%=EQUALS[{DATE.DAY}%31]]]%st%=IF[=OR[=EQUALS[{DATE.DAY}%2]%=EQUALS[{DATE.DAY}%22]]%nd%=IF[=OR[=EQUALS[{DATE.DAY}%3]%=EQUALS[{DATE.DAY}%23]]%rd%th]]] {DATE.MONTH,FULL} {YEAR}

So 2/4/1937 displays as 2nd April 1937 etc.
Chris Read
Family Historian and Ancestral Sources user.

Researching the READ family and the myriad other relations that turned up.

User avatar
ChrisRead
Famous
Posts: 146
Joined: 10 Mar 2007 17:02
Family Historian: V7
Location: Wells, Somerset, England

Re: Full Form Dates

Post by ChrisRead » 18 Dec 2020 20:55

The conclusion of my posts is that it would be nice to have a {DATE.DAYORDINAL} or {DATE.DAYORD} sub tag to make it a lot easier and clearer to use than my dirty great expression.

Probably back of the queue of ideas I expect, given I have a solution for now, unless someone comes up with a better one.

Cheers for all your work,

Chris
Chris Read
Family Historian and Ancestral Sources user.

Researching the READ family and the myriad other relations that turned up.

User avatar
ChrisRead
Famous
Posts: 146
Joined: 10 Mar 2007 17:02
Family Historian: V7
Location: Wells, Somerset, England

Re: Full Form Dates

Post by ChrisRead » 27 Jan 2021 13:20

Hi,

Just spotted the release of 7.1 on another thread, and see that you have added the {DATE.DAY.ORD}, many thanks for that.

I am about to download it and try it out. It will definitely shorten my title templates a lot. :D
Chris Read
Family Historian and Ancestral Sources user.

Researching the READ family and the myriad other relations that turned up.

User avatar
NickWalker
Megastar
Posts: 2401
Joined: 02 Jan 2004 17:39
Family Historian: V7
Location: Lancashire, UK
Contact:

Re: Full Form Dates

Post by NickWalker » 27 Jan 2021 13:51

Yes I didn't have time last night to advertise it properly and am working currently so will publicise it when I get the chance.
Nick Walker
Ancestral Sources Developer

https://fhug.org.uk/kb/kb-article/ancestral-sources/

Post Reply