Dates in Cardnames

Idea

Dates in Cardnames+status

Dates in Cardnames+priority

Dates in Cardnames+tag

 

Dates in Cardnames+issues

When a cardname is recognizable as a definite date on the calendar, I want all recognized variants of that date to use the same key, and therefore be the same card.

 

Dates in Cardnames+solution

Add special key processing to SmartName to parse the date and use something like JD###### where ###### is the julian day number.

 

Dates in Cardnames+example

> SmartName.new('Jan 31/1999')

 => <SmartName key=JD2451210[Jan 31/1999]>

> Date.jd(2451210)

 => Sun, 31 Jan 1999

> SmartName.new('Friday, 31, January 1999')

 => <SmartName key=JD2451210[Friday, 31, January 1999]>

 

Maybe numbers need handling too:

1.9.3-p362 :005 > SmartName.new('001')

 => <SmartName key=N1[001]>

1.9.3-p362 :006 > SmartName.new('1')

 => <SmartName key=N1[1]>

 

I have an experimental version of SmartName that does this and it does not break any existing tests. I'm wondering what if any risks in having these special key values that are out of band with respect to normal name to key processing.

--Gerry Gleason.....2013-10-31 22:01:40 +0000

The other thought is that I may want to have Set definitions that match on the special key prefixes (N or JD in the examples) that are similar in pattern to the *star set, or the related *rstar.

--Gerry Gleason.....2013-10-31 22:04:06 +0000

This is pretty interesting. It does mean adding more English-specific handling to SmartName, when we had very nearly eliminated it (except for :singularize), no?

--Ethan McCutchen.....2013-11-01 17:20:03 +0000

Anywhere to see that code? maybe a PR?

--Ethan McCutchen.....2013-11-01 17:20:50 +0000

I really don't want add any more english-specificity to SmartName, but maybe we should look at ways to modularize?

--Ethan McCutchen.....2013-11-01 17:21:36 +0000

Yeah, I can make a PR to the SmartName repo. This isn't that English related, only the day/month names, but numeric dates are all multi-lingual. Hopefully, the Date classes will give some international help on text in the month (days are only used so it can ignore them).

 

Once we are doing internationalized Wagn, I think a lot of this will be fairly obvious. The bottom line is that the keys don't have any language, just a number, so while the recognized names may be language specific, we can pick a default format that isn't. It isn't really quite ready yet, but reasonable for looking at the concepts.

--Gerry Gleason.....2013-11-01 21:45:45 +0000

"only the day/month names". That's more than enough, imo. And I wouldn't say that's the "bottom line". There are lots of ramifications.

 

For example, if I use "1 Julio" instead of 1 July, then it quickly becomes possible to have two different cards representing July 1 (Canada Day!). So then you go back later to add Spanish support to your wagn and suddenly you have key conflict.

 

This obviously shouldn't kill the idea, and I strongly suspect we can come up with robust solutions for handling these issues, but as far as standard wagn installations are concerned, I would not want to add any additional english-bias until a broader plan is in place.

--Ethan McCutchen.....2013-11-01 21:59:49 +0000

Dates in Cardnames+relevant user stories