In-Portal Issue Tracker - In-Portal CMS
Viewing Issue Advanced Details
653 [In-Portal CMS] Data Management feature request N/A 2010-03-27 16:47 2012-07-25 05:33
alex  
alex  
normal  
closed 5.0.3-B1  
fixed  
 
none 5.2.0-B1  
http://groups.google.com/group/in-portal-dev/browse_thread/thread/24a004db39d60ee7
1
0000653: Make "kDateFormatter" support date format constants in "format" parameter
I propose we teach kDateFormatter class how to support date format constants, like "DATE_RSS", "DATE_RFC822" and so on (see http://lv.php.net/manual/en/class.datetime.php#datetime.constants.types). For example this will allow us to write such code in template:

<item>
<title><inp2:Field name="Title"/></title>
<pubDate><inp2:Field name="CreatedOn" format="DATE_RSS"/>
</item>
In kDateFormatter::Format method before doing sprintf check if defined($format) is true. If it is, then use constant($format).
patch date_format_constants_653.patch (461) 2011-10-21 07:59
http://tracker.in-portal.org/file_download.php?file_id=1266&type=bug
patch date_format_constants_v2.patch (18,246) 2011-10-25 11:48
http://tracker.in-portal.org/file_download.php?file_id=1270&type=bug
Issue History
2012-07-25 05:33 alex Note Added: 0005073
2012-07-25 05:33 alex Status resolved => closed
2011-10-25 11:49 alex Note Added: 0004089
2011-10-25 11:49 alex Status reviewed and tested => resolved
2011-10-25 11:49 alex Fixed in Version => 5.2.0-B1
2011-10-25 11:49 alex Resolution open => fixed
2011-10-25 11:49 alex Assigned To !COMMUNITY => alex
2011-10-25 11:49 alex Changeset attached 5.2.x r14693
2011-10-25 11:48 alex Note Added: 0004088
2011-10-25 11:48 alex Assigned To alex => !COMMUNITY
2011-10-25 11:48 alex Status needs testing => reviewed and tested
2011-10-25 11:48 alex File Added: date_format_constants_v2.patch
2011-10-22 05:25 alex Estimate Points => 1
2011-10-21 07:59 erik Time Estimate Removed 1 =>
2011-10-21 07:59 erik Note Added: 0004083
2011-10-21 07:59 erik Assigned To erik => alex
2011-10-21 07:59 erik Developer => erik
2011-10-21 07:59 erik Status needs work => needs testing
2011-10-21 07:59 erik File Added: date_format_constants_653.patch
2011-10-13 10:40 Dmitry Assigned To => erik
2011-10-13 10:40 Dmitry Status active => needs work
2011-10-13 10:39 alex Additional Information Updated bug_revision_view_page.php?rev_id=874#r874
2011-09-27 05:29 alex Time Estimate Added 1
2011-09-23 21:51 Dmitry Target Version Icebox => 5.2.0
2010-03-27 16:47 alex New Issue
2010-03-27 16:47 alex Reference => http://groups.google.com/group/in-portal-dev/browse_thread/thread/24a004db39d60ee7

Notes
(0004083)
erik   
2011-10-21 07:59   
patch attached - needs testing
(0004088)
alex   
2011-10-25 11:48   
Correct check, but in incorrect place. For example when "_input_" was used as format, then constant specified in "input_format" wasn't processed.

Fixed in attached patch.
(0004089)
alex   
2011-10-25 11:49   
Fix committed to 5.2.x branch. Commit Message:

Fixes 0000653: Make "kDateFormatter" support date format constants in "format" parameter
Commit on behalf of Erik
(0005073)
alex   
2012-07-25 05:33   
Since 5.2.0 version was released.