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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

calculating weeks ?

  • 24-10-2007 6:09pm
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 Posts: 8,070 ✭✭✭Placebo


    edit: didnt work so well. suggestions welcome.


  • Registered Users, Registered Users 2 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, Registered Users 2 Posts: 8,070 ✭✭✭Placebo


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


  • Registered Users, Registered Users 2 Posts: 6,571 ✭✭✭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