SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2012
    Location
    Poole, Dorset, United Kingdom
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Booking Class & Recuring Dates In Future

    Hi
    I'm writing a booking program and when someone creates a class that starts on a specific date and time I want to be able
    to specificy that the class my run every mon, tues, wed at the same time each week for say 5 weeks.

    I have the time stamp for the start time, but how would I get it for say next monday at 19:00 and the following monday and so on

    Cheers
    Steve

  2. #2
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Start by looking at the DateTime class, especially DateInterval, but be very careful that your PHP version matches the functionality you want on all servers. This class and its associates arrived in waves through version 5.2 onwards, IIRC.

    We used to do this kind of work with strtotime(), but these classes seem to be built on the same functionality.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •