Print Page | Close Window

Question regarding the Calendar Constant Values

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=9803
Printed Date: 04 December 2024 at 9:03pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Question regarding the Calendar Constant Values
Posted By: karthiksp
Subject: Question regarding the Calendar Constant Values
Date Posted: 05 March 2008 at 4:26pm
Hi All,
 
       I am using powerbuilder with calendar control for long time (without using the recurring option).
 
      Now we are in the process implementing the recurrence object as same as outlook is doing. Now my question is, when I run the Demo Exe for Weekly Option I am getting the values for the mk:@MSITStore:C:\Program%20Files\Codejock%20Software\ActiveX\Xtreme%20Calendar%20ActiveX%20v11.1.3\Help\SymbolReference.chm::/XtremeCalendarControl~CalendarRecurrencePatternOptions~WeeklyDayOfWeekMask.html - WeeklyDayOfWeekMask  as follows
 
If I configure for Mon,Tue,Wed,Thur   It returns 30
If I configure all 7 Days                      It return 127
If I configure for Wed,Sun                  It returns 9
 
I would like to know, how calendar control comes up with these numbers and by looking at the number, how I will know what are the days in a week that recurring event is for.
 
Any help is appreciated
 
Thanks
Karthik



Replies:
Posted By: wlcabral
Date Posted: 05 March 2008 at 8:45pm

Constant Value Description

 

xtpCalendarDaySunday   1 Sunday.

xtpCalendarDayMonday  2 Monday.

xtpCalendarDayTuesday 4 Tuesday.

xtpCalendarDayWednesday 8 Wednesday.

xtpCalendarDayThursday  16 Thursday.

xtpCalendarDayFriday 32 Friday.

xtpCalendarDaySaturday 64 Saturday.

xtpCalendarDayAllWeek 127 All 7 week days.

xtpCalendarDaySaSu 65 Saturday and Sunday only.

xtpCalendarDayMo_Fr 62 All 5 Work Week Days. Includes Monday through Friday.

 

You can use the bitand function to check the values :

 

This code can give you some directions (I working with MS FOXPRO)

 

nValue = 9

isSunday = ( bitand( nValue, xtpCalendarDaySunday ) > 0 )

isMonday = ( bitand( nValue, xtpCalendarDayMonday ) > 0 )

isTuesday = ( bitand( nValue, xtpCalendarDayTuesday ) > 0 )

isWednesday = ( bitand( nValue, xtpCalendarDayWednesday ) > 0 )

isThursday = ( bitand( nValue, xtpCalendarDayThursday ) > 0 )

isFriday = ( bitand( nValue, xtpCalendarDayFriday ) > 0 )

isSaturday = ( bitand( nValue, xtpCalendarDaySaturday ) > 0 )

 

isAll7weekdays = (nValue = 127)

isSaturdayAndSunday = (nValue = 65 )

isAll5WorkWeekDays = (nValue = 62)

 

 



-------------
wlcabral


Posted By: vicos
Date Posted: 01 February 2013 at 3:11pm

Hi!

I want to we talk by mail, to exchange experience.

Please mail-me to vicos_2004@yahoo.com if you want.

Thanks!





Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net