Page MenuHomePhabricator

Enabling different date formats at the input type=date field
Closed, DeclinedPublic

Description

Author: gregra

Description:
It will be nice if the date format will be more customizable in the input type=date field as opposed to the current situation (http://www.mediawiki.org/wiki/Extension:Semantic_Forms#Semantic_Forms_issues) where it is limited only to mm/dd/yyyy. I would like it to include also the format dd/mm/yyyy.

Thanks


Version: unspecified
Severity: enhancement

Details

Reference
bz21283

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:54 PM
bzimport set Reference to bz21283.

Changing this to a Semantic MediaWiki issue - there would have to be a wiki-wide SMW setting to enable a date format other than yyyy/mm/dd.

SMW does support "dd/mm/yyyy" but whether this is preferred over "mm/dd/yyyy" depends on the settings for your language. In any case, unambiguous dates like "13/01/2009" and "01/13/2009" should always work. But there must be some preference for cases like "01/02/03" and this is determined by the wiki (content) language.

Yaron: what do you think SMW should change? I think we already have all the facilities in place to support rather arbitrary date formats.

Well, I thought there would have to be some SMW global variable (like "$smwgDateFormat") to dictate how a date like "10/11/12" should be read. Does SMW go by the content language? I don't think that's a complete solution, because, for instance, in just the English-speaking world there are different variations.

Yes, there are variations, and there might be reason to make that more configurable. But I don't think that this is related to this bug which is more about the "if" than about the "how". I guess the bug now changed to "SF should respect SMW's language settings for parsing dates" (and in particular it is no longer an SMW bug ;-).

Well, actually, I think this really is an SMW feature request - "have robust support for date formatting", or something like that. I don't think it makes sense for SF to support either "dd/mm/yy" or "mm/dd/yy" until such a thing exists. Though maybe it's worth renaming this "bug", in that case...

Could you please be more specific about what is requested here? The original bug asks for extensions in SF input widgets -- why is this an SMW bug?

gregra wrote:

Yes.
I know it is more a feature than a bug but I just wanted to get the option to control the output format in this field. I have a MediaWiki in English, but the desired format for me is dd/mm/yyyy and not mm/dd/yyyy. So I'm asking if this can be added to the SF extension.

Well, I think it's an SMW feature request (I hate that everything on here is called a "bug") in that I believe SMW's date-format handling needs to be more comprehensive before this feature can be added to SF. That's my opinion. I think I made a mistake, though, by redirecting this to SMW; I should have created a separate "bug" for SMW, then made this one dependent on that one.

Right, this would be the cleaner way to handle it. I am assigning this bug back to SF then.

In any case, I still don't understand which SMW feature is requested here: what do you mean by "more comprehensive" here? Maybe the new request can clarify this.

Yaron_Koren subscribed.

Closing this over-10-year-old bug. Neither mm/dd/yyyy nor dd/mm/yyyy are ideal date formats.