Bug Fix: Week Numbers on Mini Calendars

Support for our integrated Contact Manager, Calendar, and Project Tracker.
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Wed Sep 13, 2006 4:18 pm
The Issue

If you set the week to start on Mondays the week number beside the mini calendars on the daily view will be off in some cases.

This affects versions of SeedCodeCalendar prior to 3.13.

The Fix

This is fixed by editing one of the calendar's custom functions. If you don't have FileMaker Advanced, email me a copy of your file and I'll change this for you (you can email me here: john at seedcode.com)

To fix this replace the definition of the "SeedCode_MiniCalendarWeek" custom function with the following:

Code: Select all
Let ( [
f = GetField ( FieldName ) ;
n = ( ( Get ( CalculationRepetitionNumber ) -1 ) * 7 ) + 1  ;
minus = If ( StartWeekOnMonday = "Yes" ; -1 ; 0 ) ;
d = If ( not IsEmpty ( GetRepetition ( f ; n ) & GetRepetition ( f ; n + 6 ) ); Max (
GetRepetition ( f ; n ) + 3 ;
GetRepetition ( f ; n + 6 ) - 3
) ; // End Max
""  ) ; // End If
w = WeekOfYearFiscal ( d +  If ( StartWeekOnMonday = "Yes" ; 0 ; 1 ) ; 2 )
];

If ( not IsEmpty ( d ) ;
If ( StartWeekOnMonday <> "Yes" and d = GetRepetition ( f ; n ) and IsEmpty ( GetRepetition ( f ; n + 1 ) ) ;
Right ( "0" & w - 1 ; 2 ) ;
Right ( "0" & w ; 2 )
)
)

)


That's it.
John Sindelar
SeedCode

Return to SeedCode Calendar

Who is online

Users browsing this forum: No registered users and 3 guests

(855) SEEDCODE
[email protected]
Follow us: