Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

calculating weeks ?

  • 24-10-2007 07: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,651 ✭✭✭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