Forum OpenACS Development: formbuilder timestamp format

Collapse
Posted by Malte Sussdorff on
Is there a reason why we do not have an entry for acs-lang.localization-formbuilder_timestamp_format allowing us to enter a date with time in the ad_form?

it works like this:

{start_date:date,optional
{format {DD MONTH YYYY HH24:MI}}
}

But I would (for the sake of I18N) like to call [lc_get formbuilder_timestamp_format].

How do others handle this (I know that e.g. calendar splits it up into two widgets).

Collapse
Posted by Dave Bauer on
Good idea. I think this makes sense, but noone every did it. Date formats should be localized based on the preferred locale.
Collapse
Posted by Malte Sussdorff on
Cool. Could you add this on HEAD and oacs-5-4?
Collapse
Posted by Dave Bauer on
What is the problem? Does the format string need to be evaluated? Does the formbuilder timestamp format already exist?
Collapse
Posted by Malte Sussdorff on
The problem would be that we need the acs-lang.localization-formbuilder_timestamp_format I18N string in the system, as part of acs-lang.

The value for each locale would be (to my knowledge) "<span>#</span>acs-lang.localization-formbuilder_date_format# <span>#</span>acs_lang.localization-formbuilder_time_format#", meaning a combination of the two. At least this would be a sensible default until we get around to have it "translated" into each of the languages.