andrewplummer/Sugar — Issue #36: Bug in date format
Author: fastwings
Created: 2011-10-24 15:03:20+00:00
State: open

recive this {2424} {Oct201110} {11111111} | {1204Mon Oct 24 2011 16:50:42 GMT+0200 (Jerusalem Standard Time)}:{1010}:{4242} ({305010Not Yet Supported297201110Not Yet Supported})

when the format is this:Date.create().format('{dd} {Mon} {yyyy} | {12hr}:{mm}:{ss} ({timezone})');
also i did this i recive this:

the func i use print this (part of class)
_updateClock: function ( )
{
var currentTime = new Date ( );

var currentHours = currentTime.getHours ( );
var currentMinutes = currentTime.getMinutes ( );
var currentSeconds = currentTime.getSeconds ( );

// Pad the minutes and seconds with leading zeros, if required
currentMinutes = ( currentMinutes < 10 ? "0" : "" ) + currentMinutes;
currentSeconds = ( currentSeconds < 10 ? "0" : "" ) + currentSeconds;

// Choose either "AM" or "PM" as appropriate
var timeOfDay = ( currentHours < 12 ) ? "AM" : "PM";

// Convert the hours component to 12-hour format if needed
currentHours = ( currentHours > 12 ) ? currentHours - 12 : currentHours;

// Convert an hours component of "0" to "12"
currentHours = ( currentHours == 0 ) ? 12 : currentHours;

// Compose the string for display
var currentTimeString = Date.create().format('d Mon year | 12hr:m:seconds (tz)');

// Update the time display
$(".Header_CurrentTimeDate").text('');
$(".Header_CurrentTimeDate").text(Date.create().format('d Mon year | 12hr:minutes:s (timezone)'));
}
this is output:
24 Oct201110 11Not Yet SupportedpmMon Oct 24 2011 16:59:49 GMT+0200 (Jerusalem Standard Time) | 1204Mon Oct 24 2011 16:59:49 GMT+0200 (Jerusalem Standard Time):10591055430Not Yet Supported49:49 (305910Not Yet Supported297201110Not Yet Supported)