reed0427 Posted May 20, 2012 Report Share Posted May 20, 2012 I'm just wondering if it is possible to have a bid award that uses random start times? It would be helpful for charter flights! Quote Link to comment Share on other sites More sharing options...
freshJet Posted May 20, 2012 Report Share Posted May 20, 2012 I'm not sure what you mean? Quote Link to comment Share on other sites More sharing options...
reed0427 Posted May 20, 2012 Author Report Share Posted May 20, 2012 Right now, all flights have a set departure and arrival time. Scheduled times. Charter flights are not scheduled and so their departure time can be more random. A charter to XYZ may leave at 0700 this time, but next time it may leave at 1900. For my charter flights it would be nice if the departure time was randomly assigned somehow. Quote Link to comment Share on other sites More sharing options...
freshJet Posted May 20, 2012 Report Share Posted May 20, 2012 Been working on this and finally got a result although I don't know how to implement this into the schedules if that's what you want: <?php $min_time = 6; $max_time = 21; $random_hour = rand($min_time,$max_time); $number_formatted = str_pad($random_hour, 4, "0", STR_PAD_BOTH); if ($random_hour < 10){ echo $number_formatted; } else { echo number_format($random_hour,2,"",""); } ?> $min_time is the earliest the flight can leave and max is the latest. Hope this helps Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.