Photo Mechanic > Code Replacements

Day as ordinal number.

(1/2) > >>

Chrish_Photos:
Hello All
I'm trying to use code replacement to show the date as an ordinal number. IE 'April 2nd' instead of 'April 2'. (1st instead of 1 etc) The month is easy obviously, but how do I get the day like that.
thanks
Chris

Kirk Baker:
Chris,


--- Quote from: Chrish_Photos on November 28, 2017, 04:53:23 AM ---I'm trying to use code replacement to show the date as an ordinal number. IE 'April 2nd' instead of 'April 2'. (1st instead of 1 etc) The month is easy obviously, but how do I get the day like that.

--- End quote ---

In your Code Replacement text file you do something like this:

1[tab]1st
2[tab]2nd
3[tab]3rd
...
30[tab]30th
31[tab]31st

Do you understand the rest of Code Replacements (i.e. how to use them once you've written them)?

http://wiki.camerabits.com/en/index.php/User_Manual_Flat_View#Code_Replacement

-Kirk

Chrish_Photos:
Thanks Kirk

I do understand how the CR works, and have it pretty much sorted for this client.

I'm having the code insert the date and day of the Month from the image EXIF data, which is working fine. I just need the suffix placed automatically as well. Doing it with a manual code replacement for each day would be too slow to contemplate. I'm not sure why the client is insisting on this, but I suspect he is a grammar nazi/perfectionist.

Kirk Baker:

--- Quote from: Chrish_Photos on November 28, 2017, 08:55:38 AM ---Thanks Kirk

I do understand how the CR works, and have it pretty much sorted for this client.

I'm having the code insert the date and day of the Month from the image EXIF data, which is working fine. I just need the suffix placed automatically as well. Doing it with a manual code replacement for each day would be too slow to contemplate. I'm not sure why the client is insisting on this, but I suspect he is a grammar nazi/perfectionist.

--- End quote ---

Use separate variables with Code Replacement for the lookups.

{monthname} \{day}\

The above should do exactly what you want and isn't tedious at all.  You can use the above in the IPTC Stationery Pad during Ingest and as soon as the images hit your hard drive they'll be dated the way the client asked.

HTH,

-Kirk

Chrish_Photos:
That's brilliant Kirk. I had to think about what you said and how it works for a while, but suddenly a whole new world of advanced code replacement has opened up.

Thanks for taking the time and effort to help.

EDIT: I've just realised, my original CR is based on BIB numbers that include 1 to 31. That means I'll have two of each number and I'm guessing the CR will use the first one it gets to.
EDIT: I changed the day to {day01} and made the CR 01(tab)1st. it worked like a dream.
All the best
Chris

Navigation

[0] Message Index

[#] Next page

Go to full version