Full Form Dates
Posted: 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.
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.