Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

calculating weeks ?

  • 24-10-2007 06: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,711 ✭✭✭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