« Previous | Next » 

Revision f8f3fc23


Added by Bastian Waidelich over 10 years ago

[FEATURE] DateTime conversion support

This adds a new Type Converter which is capable of converting dates
given as string into DateTime objects. The source can be either of
type string or array.

By default it expects the string in the format "Y-m-d\TH:i:sP"
(= DateTime::W3C) but this can be overridden via MappingConfiguration.

If source is an array, expected date format, time and timezone can
be overridden from the source as well:

Example for a Fluid form (snippet):

<f:form.hidden name="newPost[date][format]" value="d.m.Y - H:i:s" />
<input type="text" name="newPost[date][date]" id="date" /><br />

See #27417 for a more advanced sample.

Change-Id: I61e7038d89fe0a3a79ee85b3f81250244c1d12df
Resolves: #27417

  • added
  • modified
  • copied
  • renamed
  • deleted