Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Question regarding the Calendar Constant Values
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Question regarding the Calendar Constant Values

 Post Reply Post Reply
Author
Message
karthiksp View Drop Down
Groupie
Groupie


Joined: 09 May 2007
Location: United States
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote karthiksp Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
wlcabral View Drop Down
Groupie
Groupie
Avatar

Joined: 25 April 2007
Location: Brazil
Status: Offline
Points: 72
Post Options Post Options   Thanks (0) Thanks(0)   Quote wlcabral Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
vicos View Drop Down
Groupie
Groupie


Joined: 23 November 2009
Location: Romania
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote vicos Quote  Post ReplyReply Direct Link To This Post 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!


Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.