Unfortunately, I doubt that your approach will work because the code for the relative published date depends on the ability to translate the publishedDate string into a Date object, and when you reformat it to a dd/mm/yyyy format such as you're doing, it won't work.
That said, you can absolutely alter the way that the date strings appear. There are two ways to do this. The first option, which is by far easier, is to set google.feeds.ShortDatePattern to "DMY" before you initialize your FeedControl. This will produce date strings like this: "04 Sep 2010" The second option, which is significantly more involved, is to override google.feeds.FeedControl.prototype.createHtml method with one that will produce the date format you prefer. The challenge here is that you will need to completely reconstruct the result's HTML node, including the title, date, snippet, etc. Jeremy R. Geerdes Effective website design & development Des Moines, IA For more information or a project quote: http://jgeerdes.home.mchsi.com [email protected] If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan Church! On Sep 8, 2010, at 11:25 PM, angel wrote: > hi, i would like to ask is the format of gf-relativePublishedDate in > feedcontrol can be changed? > > want to display the date in this format: "dd/mm/yyyy". > > i write the code like this: > var itemDate = new Date(this.theDate); > var itemDate_year = itemDate.getFullYear(); > var itemDate_month = itemDate.getMonth()+1; > var itemDate_day = itemDate.getDate(); > var newItemDate = itemDate_day + "/" + itemDate_month +"/" + > itemDate_year; > entry.publishedDate = newItemDate; > > but nothing is displayed out. > > can anyone help me on this? thanks! > > -- > You received this message because you are subscribed to the Google Groups > "Google AJAX APIs" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-ajax-search-api?hl=en. > -- You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-ajax-search-api?hl=en.
