| Author | 
         | 
         
      
        
         
         jeffw_00 Super User 
          
 
  Joined: June 30 2007
 Online Status: Offline Posts: 935
          | 
        
         
          
           | Posted: February 20 2011 at 09:41 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
This is probably an easy one for someone who has done it.
 
 Does anyone know the syntax for branching on Dusk. for example, what I want to do is
 
 Jump  if (Dusk < 7PM,1,3)
 
 not sure how to code the "Dusk < 7PM"
 
 thanks!
 /j
 
 
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         grif091 Super User 
          
 
  Joined: March 26 2008 Location: United States
 Online Status: Offline Posts: 1357
          | 
        
         
          
           | Posted: February 20 2011 at 13:31 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
[DUSK} is the number of seconds past 00:00 when dusk occurs.  I think 7PM is 19:00 * 60 * 60 for seconds to 7PM.
 
 if([DUSK} < 68400,1,3)
 
  Edited by grif091 - February 20 2011 at 13:31
  __________________ Lee G
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         jeffw_00 Super User 
          
 
  Joined: June 30 2007
 Online Status: Offline Posts: 935
          | 
        
         
          
           | Posted: February 20 2011 at 14:31 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Thanks - is there a way to test if(today = monday?)
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         BeachBum Super User 
          
  
  Joined: April 11 2007 Location: United States
 Online Status: Offline Posts: 1880
          | 
        
         
          
           | Posted: February 20 2011 at 19:04 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
IF (DAYNUMBER(TODAY()) = 2  ,"Monday", "NO")
  __________________ Pete - X10 Oldie
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         jeffw_00 Super User 
          
 
  Joined: June 30 2007
 Online Status: Offline Posts: 935
          | 
        
         
          
           | Posted: February 20 2011 at 19:58 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
thanks
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         dhoward Admin Group 
          
  
  Joined: June 29 2001 Location: United States
 Online Status: Offline Posts: 4447
          | 
        
         
          
           | Posted: February 21 2011 at 11:40 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
For the dusk comparison, you can also use:
 
 if(ph_getsuntime(today(),4) < 19:00:00,1,3)
 
 Dave.
 
         | 
       
       
        | Back to Top | 
         
          
          
         | 
       
       
       
        |   | 
      
        
         
         jeffw_00 Super User 
          
 
  Joined: June 30 2007
 Online Status: Offline Posts: 935
          | 
        
         
          
           | Posted: February 21 2011 at 12:32 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
THANKS DAVE
 /j
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         BeachBum Super User 
          
  
  Joined: April 11 2007 Location: United States
 Online Status: Offline Posts: 1880
          | 
        
         
          
           | Posted: February 21 2011 at 14:23 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
And for Monday I guess it would be: 
 
 if(ph_getsuntime(today(),4) < 19:00:00 and DAYNUMBER(TODAY()) = 2,1,3)
 
 
  __________________ Pete - X10 Oldie
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   |