Benjamin Pate wrote:
I'm going to adapt a custom CFC I made for project - so I'm not done with this yet. However, I'm willing to take any suggestions regarding an encoder.Hi Peter,
This sounds really cool. I don't have an immediate need for this kind of function, but I've had several projects in the past (using GUID identifiers) which would have benefitted from this kind of an ID. I'd love to see your work and figure out how it would apply.. In the meantime, I'll look up the Verhoeff check digit algorithm a bit more.
Post away!
-- Ben Pate
Functionality so far:
- trim string down to a specific length (i.e. using the first 5 characters of a company name as part as an account number)
- date ecoding (ex. 31/12/2005 = UR95, 7/3/2005 (today) = DG95)
a. The year encoding is based on 2-digit year of the date. 2005 is encoded 95. 1982 is encode 18. The formula is 100 minus 2-digit year. It's not century specific and this isn't the best for all circumstances. As a result, the encoding roles - 95 could mean 2005 or 1905. It doesn't has century support...see b. below
b. Possible solution to change the year encoding to something a little more complicated - it's really not that hard. Shall I?
- Possible random characters (I need to build this - I think I'm going to reach into Java for speed and better randomness)
- Masking (this needs to be built)
a. I'm assuming that a customized mask that is set at instantiation is best with a default that is overridable at runtime.
I'm blanking on anythng else at that the moment (I'm not at a location where I can see the source). Anything else, people want/need etc? I'm accepting ideas and possible solutions.
Best, .Peter
-- Peter J. Farrell :: Maestro Publishing
blog :: http://blog.maestropublishing.com email :: [EMAIL PROTECTED] phone :: 651-204-0513
Achievement: You can do anything you set your mind to when you have vision, determination, and an endless supply of expendable labor.
--
---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).
An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
