View Single Post
Addie
Junior Member
Join Date: Nov 2018
Old 11-09-2018 , 04:10   Re: Do something beetween 20:30 PM and 07:00 AM
Reply With Quote #3

Pseudo code, kinda awkward though:

PHP Code:
#define START_TIME 20.0
#define END_TIME 7.5

void YourFunction()
{
    
char strHours[3]; strMinutes[3];
    
FormatTime(strHourssizeof(strHours), "%H");
    
FormatTime(strMinutessizeof(strMinutes), "%M");

    
float hours StringToFloat(str_hours)
    
float minutes StringToFloat(str_minutes);

    
hours += (minutes/60)

    if (
hours START_TIME && hours END_TIME)
    {
        
//do stuff
    
}


Last edited by Addie; 11-09-2018 at 04:27.
Addie is offline