|  | 
| Question regarding the Calendar Constant Values | 
| Post Reply   | 
| Author | |
| karthiksp   Groupie   Joined: 09 May 2007 Location: United States Status: Offline Points: 30 |  Post Options  Thanks(0)  Quote  Reply  Topic: Question regarding the Calendar Constant Values 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 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 | |
|  | |
| wlcabral   Groupie     Joined: 25 April 2007 Location: Brazil Status: Offline Points: 72 |  Post Options  Thanks(0)  Quote  Reply  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
     | |
|  | |
| vicos   Groupie   Joined: 23 November 2009 Location: Romania Status: Offline Points: 14 |  Post Options  Thanks(0)  Quote  Reply  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! | |
|  | |
| Post Reply   | |
| Tweet | 
| Forum Jump | Forum Permissions  You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |