# Need help with if..then value range

**URL:** <https://forum.kirupa.com/t/need-help-with-if-then-value-range/258532>\
**Category:** flash\
**Created:** [April 24, 2008, 6:56pm UTC](https://forum.kirupa.com/t/need-help-with-if-then-value-range/258532 "2008-04-24T18:56:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bchalker](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/bchalker/32/441_2.png) [@bchalker](https://forum.kirupa.com/u/bchalker)\
**Post date:** [April 24, 2008, 6:56pm UTC](https://forum.kirupa.com/t/need-help-with-if-then-value-range/258532/1 "2008-04-24T18:56:26Z")

</div>

I have a flash/PHP clock I am building, but a part of it is driving me nuts.

I want a simple if…then that basically says this:

If it is Thursday, between the hours of 10:20am and 12:30PM, show this. If not, then show this.

Here is how I’ve got it so far:  
if (weekDay==“Thursday” && (hour \>= 10 && minutes \>= 20 && myAMPM==PM) && (hour == 12 && minutes \<=30) ){  
thisOn.is.\_visible=true;  
} else{  
thisOn.is.\_visible=false;  
}

but it is not correct. I just can’t get my head around how to actually write it. I basically need to know how to “group” value sets for comparison, I believe.

The “hours” are pulled from a PHP file, and are in 24-hour format.

How can I write it properly?

Thanks  
Bryan
