Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

calculating weeks ?

Options
  • 24-10-2007 7:09pm
    #1
    Registered Users Posts: 8,070 ✭✭✭


    Hey i have a general problem here, cant get my head around it , actionscript 3.0 but any pseudo-code/code will do.

    Problem: i have an xml file, with certain data, each data has a date representing it, i want to display data for the week on the graph, i.e it would show each weeks data.
    Cant grasp my head around it, i can make functions to compute wether date is monday [considering i set that as my universal starting week day] and then get the next 5 days but i'm not sure ?


Comments

  • Registered Users Posts: 8,070 ✭✭✭Placebo


    edit: didnt work so well. suggestions welcome.


  • Registered Users Posts: 413 ✭✭ianhobo


    is the data already sorted? is the data sequential by date, or will it have to be sorted first?
    Its its sorted first, it will be relatively easy to do, if its not sorted, this will have to be done first.
    How much data have you got/size of the xml file.

    Once the data id sorted, you can do it a number of ways


  • Registered Users Posts: 8,070 ✭✭✭Placebo


    well data is sorted already, so date is sequential. what way can i do it ?


  • Registered Users Posts: 6,494 ✭✭✭daymobrew


    What is the date format?
    Can you convert it to a number e.g. 200710250000 (today midnight).
    If you wanted Mon-Fri data, get the number for Monday (200710220000), and then find data that it between then and Monday + 5 days.


Advertisement