Skip Menu |

This queue is for tickets about the RT-Extension-JSGantt CPAN distribution.

Report information
The Basics
Id: 67476
Status: resolved
Priority: 0/
Queue: RT-Extension-JSGantt

People
Owner: Nobody in particular
Requestors: ruz [...] bestpractical.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.11



CC: tom.robinson [...] motec.com.au
Subject: Fwd: [rt-users] JSGantt has wrong date format for my timezone
Date: Fri, 15 Apr 2011 05:20:58 +0400
To: bug-RT-Extension-JSGantt [...] rt.cpan.org
From: Ruslan Zakirov <ruz [...] bestpractical.com>
Sent to appropriate queue on rt.cpan.org. Show quoted text
---------- Forwarded message ---------- From: Tom Robinson <tom.robinson@motec.com.au> Date: Fri, Apr 15, 2011 at 4:28 AM Subject: [rt-users] JSGantt has wrong date format for my timezone To: rt-users@lists.bestpractical.com RT 3.3.8 bestpractical-rt-extension-jsgantt-d1cacc1 Hi, I installed JSGantt a while ago but don't really use it because the date format is around the wrong way (in Australia we use DD/MM/CCYY not MM/DD/CCYY). Maybe I missed something during install? Anyway, I recently took another look at the setup and decided to change the java script jsgannt.js so that vDateInputFormat is "dd/mm/yyyy" (see diff below) but I still can't make any sense of the dates being displayed. What is the correct way to set the date format for JSGantt? *** jsgantt.js 2010/11/24 01:59:26 1.1 --- jsgantt.js 2011/04/04 06:26:11 *************** *** 567,571 **** * @default "mm/dd/yyyy" * @private ! */var vDateInputFormat = "mm/dd/yyyy"; /** * Date display format --- 567,571 ---- * @default "mm/dd/yyyy" * @private ! */var vDateInputFormat = "dd/mm/yyyy"; /** * Date display format *************** *** 574,578 **** * @default "mm/dd/yy" * @private ! */var vDateDisplayFormat = "mm/dd/yy"; var vNumUnits = 0; --- 574,578 ---- * @default "mm/dd/yy" * @private ! */var vDateDisplayFormat = "dd/mm/yy"; var vNumUnits = 0; -- Tom Robinson System Administrator [image: MoTeC] 121 Merrindale Drive Croydon South 3136 Victoria Australia T: +61 3 9761 5050 F: +61 3 9761 5051 E: tom.robinson@motec.com.au -- Best regards, Ruslan.
MoTeC Logo Master RGB.gif
yes, you need to hack jsgantt.js to get your date format, but you only need to tweak vDateDisplayFormat, ( please leave vDateInputFormat unchanged, it's needed by jsgantt extension ) best wishes sunnavy
RT has option $DateDayBeforeMonth that controls that. This extension should respect the option. On Fri Apr 15 03:21:36 2011, SUNNAVY wrote: Show quoted text
> yes, you need to hack jsgantt.js to get your date format, but > you only need to tweak vDateDisplayFormat, ( please leave > vDateInputFormat unchanged, it's needed by jsgantt extension ) > > best wishes > sunnavy >
-- Best regards, Ruslan.
thanks ruz! from version 0.11, we can use RT's config $DateDayBeforeMonth to customize this, no need to hack jsgantt.js any more! best wishes sunnavy On Fri Apr 15 21:01:15 2011, RUZ wrote: Show quoted text
> RT has option $DateDayBeforeMonth that controls that. This extension > should respect the > option. > > On Fri Apr 15 03:21:36 2011, SUNNAVY wrote:
> > yes, you need to hack jsgantt.js to get your date format, but > > you only need to tweak vDateDisplayFormat, ( please leave > > vDateInputFormat unchanged, it's needed by jsgantt extension ) > > > > best wishes > > sunnavy > >
>
Subject: Re: [rt.cpan.org #67476] JSGantt has wrong date format for my timezone
Date: Mon, 18 Apr 2011 13:07:31 +1000
To: bug-RT-Extension-JSGantt [...] rt.cpan.org
From: Tom Robinson <tom.robinson [...] motec.com.au>
Thanks for clearing this up. Someone else put me in here and I became totally bewildered. I assume this is the 'live' ticket? On 18/04/11 11:55, sunnavy via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=67542 > > > Hi tom > > see #67476 for details. > please reply to #67476 instead if something is wrong, I'm gonna > close this ticket. > > thanks > sunnavy > > > On Sun Apr 17 18:55:44 2011, tom.robinson@motec.com.au wrote:
>> RT 3.3.8 >> bestpractical-rt-extension-jsgantt-d1cacc1 >> >> I did receive any valuable feedback from the bug list - just 'resolved'. >> If you please, what is the issue and what is the resolution?
Download signature.asc
application/pgp-signature 253b

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #67476] JSGantt has wrong date format for my timezone
Date: Mon, 18 Apr 2011 12:09:00 +0800
To: Tom Robinson via RT <bug-RT-Extension-JSGantt [...] rt.cpan.org>
From: sunnavy <sunnavy [...] gmail.com>
I just want to remove duplicated tickets :D #67476 is good to leave alone as it contains all the related info. On 11-04-17 23:07, Tom Robinson via RT wrote: Show quoted text
> Queue: RT-Extension-JSGantt > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=67476 > > > Thanks for clearing this up. Someone else put me in here and I became > totally bewildered. I assume this is the 'live' ticket? > > On 18/04/11 11:55, sunnavy via RT wrote:
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=67542 > > > > > Hi tom > > > > see #67476 for details. > > please reply to #67476 instead if something is wrong, I'm gonna > > close this ticket. > > > > thanks > > sunnavy > > > > > > On Sun Apr 17 18:55:44 2011, tom.robinson@motec.com.au wrote:
> >> RT 3.3.8 > >> bestpractical-rt-extension-jsgantt-d1cacc1 > >> > >> I did receive any valuable feedback from the bug list - just 'resolved'. > >> If you please, what is the issue and what is the resolution?
> >
Subject: Re: [rt.cpan.org #67476] JSGantt has wrong date format for my timezone
Date: Tue, 03 May 2011 11:19:32 +1000
To: bug-RT-Extension-JSGantt [...] rt.cpan.org
From: Tom Robinson <tom.robinson [...] motec.com.au>
I've found another potential bug. When I display the 'week' view, the Gantt date columns still use the month/day format. In Australia we expect day/month format. I don't know if this is fixed in 0.11 by using RT's config $DateDayBeforeMonth - I'm not upgraded to that version yet. I have hacked the java script again to fix this: # rcsdiff -r1.2 -C2 jsgantt.js =================================================================== RCS file: RCS/jsgantt.js,v retrieving revision 1.2 diff -C2 -r1.2 jsgantt.js *** jsgantt.js 2011/05/03 00:41:20 1.2 --- jsgantt.js 2011/05/03 00:57:31 *************** *** 1243,1247 **** if(vNxtDate <= vMaxDate) { ! vDateRowStr += '<td class="ghead" style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; HEIGHT: 19px; BORDER-LEFT: #efefef 1px solid;" bgcolor=#' + vWeekdayColor + ' align=center width:'+vColWidth+'px><div style="width: '+vColWidth+'px">' + (vTmpDate.getMonth()+1) + '/' + vTmpDate.getDate() + '</div></td>'; if( vCurrDate >= vTmpDate && vCurrDate < vNxtDate ) vItemRowStr += '<td class="ghead" style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #efefef 1px solid;" bgcolor=#' + vWeekdayColor + ' align=center><div style="width: '+vColWidth+'px">&nbsp&nbsp</div></td>'; --- 1243,1247 ---- if(vNxtDate <= vMaxDate) { ! vDateRowStr += '<td class="ghead" style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; HEIGHT: 19px; BORDER-LEFT: #efefef 1px solid;" bgcolor=#' + vWeekdayColor + ' align=center width:'+vColWidth+'px><div style="width: '+vColWidth+'px">' + vTmpDate.getDate() + '/' + (vTmpDate.getMonth()+1) + '</div></td>'; if( vCurrDate >= vTmpDate && vCurrDate < vNxtDate ) vItemRowStr += '<td class="ghead" style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #efefef 1px solid;" bgcolor=#' + vWeekdayColor + ' align=center><div style="width: '+vColWidth+'px">&nbsp&nbsp</div></td>'; *************** *** 1250,1254 **** } else { ! vDateRowStr += '<td class="ghead" style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; HEIGHT: 19px; BORDER-LEFT: #efefef 1px solid; bgcolor=#' + vWeekdayColor + ' BORDER-RIGHT: #efefef 1px solid;" align=center width:'+vColWidth+'px><div style="width: '+vColWidth+'px">' + (vTmpDate.getMonth()+1) + '/' + vTmpDate.getDate() + '</div></td>'; if( vCurrDate >= vTmpDate && vCurrDate < vNxtDate ) vItemRowStr += '<td class="ghead" style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #efefef 1px solid; BORDER-RIGHT: #efefef 1px solid;" bgcolor=#' + vWeekdayColor + ' align=center><div style="width: '+vColWidth+'px">&nbsp&nbsp</div></td>'; --- 1250,1254 ---- } else { ! vDateRowStr += '<td class="ghead" style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; HEIGHT: 19px; BORDER-LEFT: #efefef 1px solid; bgcolor=#' + vWeekdayColor + ' BORDER-RIGHT: #efefef 1px solid;" align=center width:'+vColWidth+'px><div style="width: '+vColWidth+'px">' + vTmpDate.getDate() + '/' + (vTmpDate.getMonth()+1) + '</div></td>'; if( vCurrDate >= vTmpDate && vCurrDate < vNxtDate ) vItemRowStr += '<td class="ghead" style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #efefef 1px solid; BORDER-RIGHT: #efefef 1px solid;" bgcolor=#' + vWeekdayColor + ' align=center><div style="width: '+vColWidth+'px">&nbsp&nbsp</div></td>';
Download signature.asc
application/pgp-signature 253b

Message body not shown because it is not plain text.

thanks for reporting this, it's fixed in 0.12, which I just uploaded to cpan. best wishes sunnavy On Mon May 02 21:19:50 2011, tom.robinson@motec.com.au wrote: Show quoted text
> I've found another potential bug. > > When I display the 'week' view, the Gantt date columns still use the > month/day format. In Australia we expect day/month format. I don't know > if this is fixed in 0.11 by using RT's config $DateDayBeforeMonth - I'm > not upgraded to that version yet. > > I have hacked the java script again to fix this: > > > # rcsdiff -r1.2 -C2 jsgantt.js > =================================================================== > RCS file: RCS/jsgantt.js,v > retrieving revision 1.2 > diff -C2 -r1.2 jsgantt.js > *** jsgantt.js 2011/05/03 00:41:20 1.2 > --- jsgantt.js 2011/05/03 00:57:31 > *************** > *** 1243,1247 **** > > if(vNxtDate <= vMaxDate) { > ! vDateRowStr += '<td class="ghead" style="BORDER-TOP: > #efefef 1px solid; FONT-SIZE: 12px; HEIGHT: 19px; BORDER-LEFT: #efefef > 1px solid;" bgcolor=#' + vWeekdayColor + ' align=center > width:'+vColWidth+'px><div style="width: '+vColWidth+'px">' + > (vTmpDate.getMonth()+1) + '/' + vTmpDate.getDate() + '</div></td>'; > if( vCurrDate >= vTmpDate && vCurrDate < vNxtDate ) > vItemRowStr += '<td class="ghead" > style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: > #efefef 1px solid;" bgcolor=#' + vWeekdayColor + ' align=center><div > style="width: '+vColWidth+'px">&nbsp&nbsp</div></td>'; > --- 1243,1247 ---- > > if(vNxtDate <= vMaxDate) { > ! vDateRowStr += '<td class="ghead" style="BORDER-TOP: > #efefef 1px solid; FONT-SIZE: 12px; HEIGHT: 19px; BORDER-LEFT: #efefef > 1px solid;" bgcolor=#' + vWeekdayColor + ' align=center > width:'+vColWidth+'px><div style="width: '+vColWidth+'px">' + > vTmpDate.getDate() + '/' + (vTmpDate.getMonth()+1) + '</div></td>'; > if( vCurrDate >= vTmpDate && vCurrDate < vNxtDate ) > vItemRowStr += '<td class="ghead" > style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: > #efefef 1px solid;" bgcolor=#' + vWeekdayColor + ' align=center><div > style="width: '+vColWidth+'px">&nbsp&nbsp</div></td>'; > *************** > *** 1250,1254 **** > > } else { > ! vDateRowStr += '<td class="ghead" style="BORDER-TOP: > #efefef 1px solid; FONT-SIZE: 12px; HEIGHT: 19px; BORDER-LEFT: #efefef > 1px solid; bgcolor=#' + vWeekdayColor + ' BORDER-RIGHT: #efefef 1px > solid;" align=center width:'+vColWidth+'px><div style="width: > '+vColWidth+'px">' + (vTmpDate.getMonth()+1) + '/' + vTmpDate.getDate() > + '</div></td>'; > if( vCurrDate >= vTmpDate && vCurrDate < vNxtDate ) > vItemRowStr += '<td class="ghead" > style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: > #efefef 1px solid; BORDER-RIGHT: #efefef 1px solid;" bgcolor=#' + > vWeekdayColor + ' align=center><div style="width: > '+vColWidth+'px">&nbsp&nbsp</div></td>'; > --- 1250,1254 ---- > > } else { > ! vDateRowStr += '<td class="ghead" style="BORDER-TOP: > #efefef 1px solid; FONT-SIZE: 12px; HEIGHT: 19px; BORDER-LEFT: #efefef > 1px solid; bgcolor=#' + vWeekdayColor + ' BORDER-RIGHT: #efefef 1px > solid;" align=center width:'+vColWidth+'px><div style="width: > '+vColWidth+'px">' + vTmpDate.getDate() + '/' + (vTmpDate.getMonth()+1) > + '</div></td>'; > if( vCurrDate >= vTmpDate && vCurrDate < vNxtDate ) > vItemRowStr += '<td class="ghead" > style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: > #efefef 1px solid; BORDER-RIGHT: #efefef 1px solid;" bgcolor=#' + > vWeekdayColor + ' align=center><div style="width: > '+vColWidth+'px">&nbsp&nbsp</div></td>'; > >