Jump to content

sprdnja

New Members
  • Posts

    2
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

sprdnja's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Denno020, I have to say one thing - you are genius I totally mis-minded that solution and date functions. It is easiest way ever. In one moment I found myself of writing function that already exist in PHP :-) Here is how I done this: 1. first implement calculation between dates using snippet http://snipplr.com/view/2223/get-number-of-days-between-two-dates/ 2. then calculate if the number odd or even, if it is even everything is OK $numberofdaysbetween = count_days($date1, $date2); $bus=($numberofdaysbetween&1) ? "odd" : "even"; echo "$bus";
  2. I'm new here so I say hallo to everyone I have to implement bus time table in this way: Every bus drives every second day from the day chosen. Let's say: If xx bus goes every second day from 23rd February to 30th June to Spain (23rd, 25th, 27th...), How can I check if let's say on 14th May there is bus to Spain? I started with odd and even numbers: if it starts from the even day than there is array of months with number of days, but what if Feb has 29days (every 4th year) instead of 28... I'm totally confused here. In database I have rows: start date, end date and bus name. Is there any other way of implementing this?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.