Jump to content
Peter Tarkkonen

Sentence dates; [Y]

Recommended Posts

Sentence variable [Y] is returning the year of the date.

 

Year is also retuned in a case if date has circa, say etc., however the year [Y] returns does not anymore have circa, say etc. with it.

 

If this is a purpose, there surely is a reason for it. I wish to see circa, say etc. returned as well

 

Peter

Share this post


Link to post
Share on other sites

Peter,

 

as you found the [Y] variable has limited functionality only.

 

As TMG Help indicates: a year -and only the pure year without any date modifiers- will be returned for exact, before, after, circa and say dates. Either/or or From/to date modifiers will return "an unknown year".

 

However, as you know, you can easily achieve what you want by simply using the [D] variable instead.

 

###############################

 

What's the background of your wish, please - anything special which you can't achieve right now?

Share this post


Link to post
Share on other sites

Vera,

 

not a big thing, mainly visual.

 

I have added a sentence to a deceased person if his/her spouse remarried ie. "Widow of hers/his remarried with Mr/Mrs Smith in New York 2014".

I believe it looks better than "Widow ..... in New York on 24.7.2014".

 

But because for marriages which happened 1600-1700 I have many wedding dates with "say" or "circa". So if I would use [Y] "say 1665" would change to "1665" and that cant happen.

 

Now I will use [D] but as mentioned would prefer [Y]

 

Peter

Share this post


Link to post
Share on other sites

Peter,

 

although I still think that using [D] would be the way to go, you could even today use [Y] for the special situations you have in mind.

 

If your policy is to use [Y] i.e. for dates for which the sentence output should read i.e. "circa 1700" then you could hardcode the word "circa" within your sentence, like

 

However, if today's limited functionality regarding omitted date modifiers for [Y] might ever be changed, you will have to modify your sentences. Just something to keep in mind.

Share this post


Link to post
Share on other sites

Hi Peter,

 

I understand your "wish". I would actually modify your wish to request one of two new Date variables.

  • I would suggest either having a new separate variable that returned Year with qualifier (e.g. [YQ]), or
  • I would find more generally useful a new variable which returned (language specific) text of only the qualifier (e.g. [DQ]); and the conditional would return nothing if the date has no modifier.

The first suggestion is so that the users could have Year either with or without qualifier, whatever was of value to them.

 

The second would allow sentences to explain the qualifier, as well as conditionally put it before a [Y] variable. At the same time, it would allow introducing new variables which output only the cardinal number (e.g. [DC] for '14') and ordinal number (e.g [DO] for 'fourteenth') within the month, as well as only the name of the month (e.g. [DM] for "May). Thus, the qualifier variable could be output conditionally in front of those new variables if desired. As examples:

 

""

 

Or in your case one might have " ..."

 

--------------------

 

However, until any such changes are made, I think Vera's suggestion for "hard coding" the qualifier within the [Y] variable phrase in the sentence is one "workaround".

 

For my sentences, I choose to always have a memo part in front of the date to optionally qualify that date, e.g. . I would suggest in your case something similar like . That way you could optionally qualify the Year however you desired. For example, [M2] might be some more "readable" phrase other than "circa" or "say" such as "some time around the year". It also allows variety in these phrases so the output does not appear quite so mechanical.

 

Hope this gives you ideas,

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×