User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

Thread: Weekend Finder

  1. #1
    Clicker Fusion 2.5 Developer

    Join Date
    Jan 2007
    Location
    USA
    Posts
    691
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Weekend Finder

    I'm developing a special schedule program for my school, which incorporates a six-day schedule (in a 5 day week).

    Currently, I use this formula to figure out what day it is on this special schedule:
    Code:
    ([Day of the Year] mod 6)+[Number of days to skip]
    So if the day of the year was 255 and the number of skip days was 2 then the current "day" on the 6-day schedule would be Day 5.

    However, I'm looking for a way to set this up so that my users don't have to set two skip days every time a weekend comes up. Does anyone know an efficient way for the program to determine how many weekends have gone by since it was last opened?

    For dynamics, I am using the standard INI object.

  2. #2
    No Products Registered

    Join Date
    Mar 2007
    Location
    Sydney, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Weekend Finder

    I am fairly sure there is an extension which can retrieve from the system clock. You could use this byt recording the last login date and compare it against the current date to find out how many days have passed.

  3. #3
    Clicker Fusion 2.5 Developer

    Join Date
    Jan 2007
    Location
    USA
    Posts
    691
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Weekend Finder

    I can do that, but I'm having trouble determining if a weekend passed. For instance, if there was only 3 days since the last opening of the software, how can I make the program know whether or not two of those days were weekends?

  4. #4
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Weekend Finder

    ..and what if they had to reboot the server?

  5. #5
    Clicker Fusion 2.5 Developer

    Join Date
    Jan 2007
    Location
    USA
    Posts
    691
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Weekend Finder

    ...server?? I don't think I'm making myself clear.

    It's just a simple scheduling program. I want to know how the program can determine a weekend period when it's closed and then re-opened.

  6. #6
    Clicker Multimedia Fusion 2 Developer
    Jax's Avatar
    Join Date
    Jul 2006
    Location
    UK
    Posts
    693
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Weekend Finder

    I am a little bit confused, but it seems to be that you'd probably be fine if there was an extension (or whatever) which converted a date to a day-of-week.

    This is not difficult for an extension developer to program, given that Boost date_time has all of that built in.

    Edit: Date & Time, Timestamp and Timer can all do this. However on second thoughts I'm not entirely sure this helps! Maybe if you explain how the 6-day schedule works we can help more?

  7. #7
    Clicker Fusion 2.5 Developer

    Join Date
    Jan 2007
    Location
    USA
    Posts
    691
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Weekend Finder

    OK, here's how the 6-day schedule works:

    There are six days called Alpha, Beta, Gamma, Delta, Psi, and Omega (I don't know why they are named that)

    The days fall in order, except one day is omitted each week. So if yesterday (Friday) was Alpha, Monday would be Beta. The weekend would be completely disregarded.

    Anyway, I think I figured something out. I'll post again and say how it went.

    EDIT: Well, that didn't work. I was trying to see if I could compare the day of the week, but I forgot to take into account that the program could have been closed for several weeks.

  8. #8
    Clicker Fusion 2.5 Developer

    Join Date
    Jan 2007
    Location
    USA
    Posts
    691
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Weekend Finder

    I know I'm reopening an old post, but I'm still having a remarkable amount of trouble figuring out this problem.

    Does anyone have any ideas as to how I can do this?

  9. #9
    Clicker Multimedia Fusion 2 Developer
    Jax's Avatar
    Join Date
    Jul 2006
    Location
    UK
    Posts
    693
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Weekend Finder

    I made an example for you (uploaded thanks to the MFA repository).

    It doesn't take holidays into account if the schedule just pauses during them, although it is fine if it still runs through during them.

    Does it help?

  10. #10
    Clicker Multimedia Fusion 2 DeveloperHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    drnebula's Avatar
    Join Date
    Jul 2006
    Location
    Pennsylvania, USA
    Posts
    908
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Weekend Finder

    I work for a school that also runs on a six day rotating schedule. Every school has different holidays and then there are snow days, inservice days, etc. that would have to be adjusted for in what ever program was developed.

    Steve

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Replies: 0
    Last Post: 10th August 2012, 02:04 PM
  2. Value Finder
    By uprize in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 30th June 2007, 11:10 AM

Posting Permissions

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