Maxpico,
Thanks for your interest!
Let me tell some words about the date convert script developments... I decided developing the convert date script because I did need it for Links 2.0. You can find my posts in that subject if you search for them in Links 2.0 forums. When I finished the v1.0 version, it was the first perl script ever I done.
The 1.0 version did work fine. It was 3 years ago. Since I basically created for myself, I didn't plan to release it. However I saw the public demand for such script, so I decided to improve it, and planned to sell it for developers for reasonable price. At that time there was such date module which would satisfy my needs, and probably other's too. Therefore I developed the 2.0 version. But before I would ever release it I would need to create a module from it. At that time I did not have that knowledge, additionally in the meantime appeared a module which does the same, what my script does.
So I will never finish development of convert date script, because there are already module solutions, which knows much more than my script.
One was Class::Date (can find on CPAN or the dev site here:
http://hacks.dlux.hu/Class-Date/). Yeah, he is also Hungarian who did such nice module.
The other was GT::Date, what I currently use. IMO, if GT::Date would not exist, I would use Class::Date for sure.
Now back to my script:
# Description: Converts any date into any other date format (doesn't compute or validate dates, just changing their format)
# Usage: &convert_date ($date, $input_format, $output_format, $language);
# Example: &convert_date ('09-11-1998', 'dd-mm-yyyy', 'yyyy.mmm.dd.', 'English');
# Format strings: yyyy, mmmm, mmm, mm, dddd, ddd, dd, HH, MM, SS
# Notes:
# - input format MUST match the input date format
# - ddd and dddd will be always based (computed) on the given input date
#Changes in v2.0beta3:
# - some small bug changes
#Changes in v2.0beta2:
# - strict usage - hopefully now is mod_perl compatible
# - multi level debug added
# - exception added to convert special partial formats
#Changes in v2.0beta1:
# - completely reworked algorithm for format converting
# - error messages added, error checking works fine as I know
# - now validates dates, prints error message if a date element is not valid
# - added support for yy format. e.g. dd/mm/yy
# Known problems:
# - no support for GMT & UTC time zones (yet)
# - no support for 12-24 hour format converting (yet)
# - no support for language to language converting
And as I mentioned earlier, can convert dates correctly from any format to any format, to unix time and from unix time back to chosen format, also can display date languages in many language, including Hungarian, German, English, French, Russian, Spanish, and probably more automatically, just by setting the correct locale.
As for the used tag format, as Paul suggested a few years ago, probably I would change the formatting to use ``
%tag%'' style instead of just using ``
tag'' (if I would finish the script).
I will likely never release the script for the public. There are better date converting modules, I mentioned.
Also I would not want, that Paul and maybe other skilled programmers would munching on my 2 year ago used programming solutions... Using my current knowledge I would do it module based, likely better structured, and faster.
Finally I attached the test results file of my script (test_result.txt). See the results yourself.
If you checked the test results and still find the script useful, we can discuss about my date converting script privately.
Best regards,
Webmaster33
Paid Support from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...