Hi, there are a couple of things I wanted to discuss without further bloating task #2614. These are only coding issues, that's why I didn't post it to the tracker but on our development mailing list.
1. The inverted parameters in format_date() and utils_format_date() are a
sure way to mess things up sometime. I would strongly suggest to uniform
the calls; I can do the necessary conversions in the code.
2. The parameter $default_value is not used anywhere in the code, that's why
I didn't implement it in the function. We should probably drop it until we
really need it. If the timestamp is null, we can just return "-".
3. Do we really need utils_format_date() and format_date()? If the first
function name is too long, we can just drop it and use format_date(). I
wanted to reduce the code bloat, which is already quite big. So why do we
provide an alias for this function, when the alias function is not used
anywhere in our code?
4. Same goes for utils_unixtime_to_date().
5. I think we should drop $sys_datefmt from the configuration options and
hence from the global variables. It's recommended anyway to comment this
option out, and the PHP frontend has more than just one format (namely
default, short, minimal) to display a date. Thus, it's not enough to
control how dates are displayed.
Cheers,
--
Tobias
"Only two things are infinite, the universe and human stupidity,
and I'm not sure about the former" -- Albert Einstein
pgpaP3xZEVOlg.pgp
Description: PGP signature
_______________________________________________ Savane-dev mailing list [email protected] https://mail.gna.org/listinfo/savane-dev
