Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
forms system
Priority:
Normal
Category:
Feature request
Assigned:
Issue tags:
Reporter:
Created:
23 Mar 2012 at 17:30 UTC
Updated:
29 Jul 2014 at 20:30 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
LSU_JBob commentedComment #2
LSU_JBob commentedusing the name "form_date" to avoid conflicts for now.
Comment #3
hansyg commentedComment #5
Niklas Fiekas commentedThank you, @LSU_JBob.
Important question on how to proceed: How to handle the value internally?
138849.1999-03-04.Disadvantage: Hard to process.
array('year' => 2005, 'month' => 5, 'day' => 23). This is how the current date element does it.TODO: Discuss this with KarenS or open an issue on http://drupal.org/project/issues/1512146?categories=All.
Comment #6
LSU_JBob commentedNo timestamp, makes the most sense but I've always had problems with it when I try to go way way back in time. Like 1800's and stuff...
I like the array, keeps things format agnostic for when things get dicey with dates, like when displaying the date according to locale.
Comment #7
LSU_JBob commentedUnassigning from myself in case that's stopping anyone from throwing a patch up :) I'll still be looking at this though.
Comment #8
cosmicdreams commentedAssigning to me because I'm excited to get this one done (even though it's not supported widely in browsers yet)
Comment #9
dave reidWe should go exactly with what the format of HTML5 date says, and use a string in the format of 'Y-m-d' (e.g. 2012-09-11).
Comment #10
cosmicdreams commentedagreed
Comment #11
cosmicdreams commentedI just tested the latest Opera (12.01) and found that it supports the following:
Comment #12
karens commentedDesktop browser support is really pitiful for this, but mobile support is good. Using the string seems to be what most people are doing, it is human-readable, and it corresponds to the way microformats and RDF are handled.
I actually hope to introduce a patch for a more complete set of date elements in core, but this is the place to start I guess.
Comment #13
Anonymous (not verified) commentedAn ISO8601 string would probably be best for storing internally.
The HTML5 spec doesn't provide a single standard, it provides many different options, assuming that the consumer will know which is being used based on other semantics, like microdata.
#1347648: Change date_iso8601 to format the 9 HTML datetimes is related.
Comment #14
karens commentedI think this is unneeded now, #501428: Date and time field type in core includes all the HTML5 date elements. If anyone thinks that patch needs changes you could post on that issue.