[OpenAjaxIDE] Agenda for tomorrow: Review Widget Metadata chapter

Steve Repetti steve at radwebtech.com
Tue Aug 4 17:36:54 PDT 2009


The xDate JavaScript class and dateFormat( ) wrapper function combined are 53 lines of code.  No additional localization is provided beyond the inherited elements of the JavaScript run-time environment.

 

-- Steve Repetti

 

From: Bertrand Le Roy [mailto:Bertrand.Le.Roy at microsoft.com] 
Sent: Tuesday, August 04, 2009 5:56 PM
To: Jon Ferraiolo; Steve Repetti
Cc: ide-bounces at openajax.org; ide at openajax.org
Subject: RE: [OpenAjaxIDE] Agenda for tomorrow: Review Widget Metadata chapter

 

Yes, ours is also a few hundred lines of code (for both parse and format), plus a blob of JSON data for each culture and special optional support for non-Gregorian calendars. It’s a lot of work (and tricky to get right too). Better to re-use something existing or provide a simple, non-localized implementation and allow for more elaborate providers to plug-in?

 

From: ide-bounces at openajax.org [mailto:ide-bounces at openajax.org] On Behalf Of Jon Ferraiolo
Sent: Tuesday, August 04, 2009 12:12 PM
To: Steve Repetti
Cc: ide-bounces at openajax.org; ide at openajax.org
Subject: Re: [OpenAjaxIDE] Agenda for tomorrow: Review Widget Metadata chapter

 

Two questions: 

* Internationalization: Aren't there complexities with date formatting having to do with the current locale? The dojox logic includes several files having to do with internationalization, including a few Hebrew*.js and IslamicDate.js (545 lines of JS).

* Code size: Does anyone have is a guesstimate about how many lines of JavaScript code would be needed to implement @@dataformat()@@. Steve's features appear to be a subset of the PHP features. Our open source widget loader is 1760 lines of JavaScript. The dojox file that implements PHP's date features is 308 lines, but when you add in the Hebrew and Islamic stuff, the dojox date routines will be roughly the same size as the rest of the widget loader.

Jon



Inactive hide details for "Steve Repetti" ---08/04/2009 11:29:30 AM---I have written an xDate JavaScript class which does a ton"Steve Repetti" ---08/04/2009 11:29:30 AM---I have written an xDate JavaScript class which does a ton of date formatting, and includes an extern



From:


"Steve Repetti" <steve at radwebtech.com>



To:


"'Kin Blas'" <jblas at adobe.com>, <ide at openajax.org>



Date:


08/04/2009 11:29 AM



Subject:


Re: [OpenAjaxIDE] Agenda for tomorrow: Review Widget Metadata chapter



Sent by:


ide-bounces at openajax.org

  _____  




I have written an xDate JavaScript class which does a ton of date formatting, and includes an externalized function dateFormat( dte, fstr ):

// Supported formats:

// mm = month as "1" dd = day as "1" YY = day as "01"
// MM = month as "01" DD = day as "01" YYYY = day as "2001"
// MMM = month as "Jan" DDD = day as "1st"
// MMMM = month as "January" DDDD = day as "Saturday"

// time: 
// hh = hour as "05" (12-hour clock) MN = minutes as "01" ap = am/pm as "am"
// HH = hour as "17" (24-hour clock) SS = seconds as "01" AP = am/pm as "AM"
// SSSS = milliseconds as "0001"

As in: dateFormat( null, “The date is MMMM, DD, YYYY and the time is HH:MN:SS” )


I would be more than happy to donate it to the cause if anyone wants (I wrote it as part of my  <http://www.xwinlib.com/> www.xwinlib.com library).

Let me know,

Steve Repetti
 <http://www.radwebtech.com/> www.radwebtech.com
 <http://www.scrapplet.com/> www.scrapplet.com



From: ide-bounces at openajax.org [mailto:ide-bounces at openajax.org] On Behalf Of Kin Blas
Sent: Tuesday, August 04, 2009 1:52 PM
To: ide at openajax.org
Subject: Re: [OpenAjaxIDE] Agenda for tomorrow: Review Widget Metadata chapter

Unfortunately, I won’t be able to make the meeting today due to a last-minute internal conflict which I can’t get out of. I will also be on PTO Wednesday through next Tuesday so I won’t be available via email.

I have not had a chance to link up with Lori, but what I did have in mind was something similar to the PHP or Unix style date formatting where variable substitutions are made:

<p>Euro-Style: @@formatdate(myDate,”d/m/Y”)@@</p>
<p>Western Style: @@formatdate(myDate,”m/d/Y”)@@</p>

This would be the most flexible as opposed to having built-in canned formatted dates. Of course this would mean we would have to adopt the PHP/Unix variables (desireable), or come up with our own (less-desireable).

--== Kin ==--

From: ide-bounces at openajax.org [mailto:ide-bounces at openajax.org] On Behalf Of Jon Ferraiolo
Sent: Monday, August 03, 2009 11:35 AM
To: ide at openajax.org
Subject: [OpenAjaxIDE] Agenda for tomorrow: Review Widget Metadata chapter

The main topic for tomorrow's phone call is detailed review of the Widget Metadata chapter:

*  <http://www.openajax.org/member/wiki/OpenAjax_Metadata_1.0_Specification_Widget_Metadata> http://www.openajax.org/member/wiki/OpenAjax_Metadata_1.0_Specification_Widget_Metadata

Kin and Lori were also going to look into a proposal for a date formatting function. Regarding that topic, I did some web searches. It appears that ExtJS and Dojo (in dojox:  <http://api.dojotoolkit.org/jsdoc/1.3/dojox.date.php.DateFormat> http://api.dojotoolkit.org/jsdoc/1.3/dojox.date.php.DateFormat) have both offered JavaScript APIs that implement a subset of PHP's date formatting features. Also, the ServerJS crowd are talking about offering a date formatting feature that is also derivative of PHP's date formatting features. ( <http://www.mynajs.org/shared/docs/js/libOO/files/Date-js.html> http://www.mynajs.org/shared/docs/js/libOO/files/Date-js.html) Adam has been making comments to the ServerJS crowd that they should focus on core features and treat date formatting as something that can be provided by an add-on JavaScript library.

Thanks to Lori for the editorial work on the cover page and chapters 1 and 2._______________________________________________
IDE mailing list
IDE at openajax.org
http://openajax.org/mailman/listinfo/ide

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://openajax.org/pipermail/ide/attachments/20090804/a9ac518f/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 105 bytes
Desc: not available
Url : http://openajax.org/pipermail/ide/attachments/20090804/a9ac518f/attachment.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 168 bytes
Desc: not available
Url : http://openajax.org/pipermail/ide/attachments/20090804/a9ac518f/attachment.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 166 bytes
Desc: not available
Url : http://openajax.org/pipermail/ide/attachments/20090804/a9ac518f/attachment-0001.png 


More information about the IDE mailing list