Re: week numbers by Support
Support
Thu Mar 10 04:28:46 CST 2005
Hi,
We had the same problem and found the following solution!
Make a backup of the [CRM-Directory]\_controls\datetime\date.js in and then
open it and replace the getWeekNumber function
with the following code:
function getWeekNumber( oDate )
{
var oSiebterJanuar = new Date( oDate.getYear(), 0, 7 );
var oErsterMontag
if (oSiebterJanuar.getDay() >= 4) {
oErsterMontag = new Date( oDate.getYear(), 0,
8 - oSiebterJanuar.getDay());
} else {
oErsterMontag = new Date( oDate.getYear(), 0,
1 - oSiebterJanuar.getDay());
}
if (oErsterMontag.getDate() == 8) {
oErsterMontag.setDate(1);
}
var iMSSinceYearStart = oDate.valueOf( ) - oErsterMontag.valueOf( )
+ 86400000; // 1000 * 60 * 60 * 24
var fWeeksSinceYearStart = iMSSinceYearStart / 604800000;
// 1000 / 60 / 60 / 24 / 7;
var iWeeksSinceYearStart = Math.ceil( fWeeksSinceYearStart );
if( iWeeksSinceYearStart == 0 ) {
iWeeksSinceYearStart = 53;
}
return iWeeksSinceYearStart;
}
Hope this helps
--
--
Christian
support@mscrm-addons.com
www.mscrm-addons.com
Your company for MS-CRM ADD-ONS!
GroupCalendar for MSCRM
Related Documents for MSCRM
WordMailMerge for MSCRM
"Susanne" <s.post@dlink.net> schrieb im Newsbeitrag
news:OOn$giVJFHA.732@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> In MS CRM you have week numbers which aren't equal to the ones we use in
> the Netherlands. CRM says that 1 januari is week 1, but that isn't
> correct for us. For us is the first week of the year where we have 4 days
> in januari. How could I change this? Microsoft Outlook does it correct.
>
> thanks in advance,
>
>