User Tag List

Results 1 to 3 of 3

Thread: Get date for monday to friday for the current week

  1. #1
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleUnicode Add-onInstall Creator Pro
    StingRay's Avatar
    Join Date
    Nov 2006
    Location
    Austria
    Posts
    1,050
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)

    Question Get date for monday to friday for the current week

    Hi!

    Is it possible with the Date object and a bit of math to get the date for every weekday of the actual week?

    Let's take an example:

    If today is the 3rd of may 2013, a friday, i wanna get the info, that:

    Monday: 29th of april
    Tuesday: 30th of april
    Wednesday: 1st of may
    Thursday: 2nd of may
    Friday: 3rd of may
    Saturday: 4th of may

    I'm a bit lost and i wanna avoid using php and GET if possible.

  2. #2
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleUnicode Add-onInstall Creator Pro
    StingRay's Avatar
    Join Date
    Nov 2006
    Location
    Austria
    Posts
    1,050
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    In php it seems quite easy: (may somebody is interested in a php-solution)

    $week_start = date('Y-m-d', strtotime('this week last monday'));
    $week_end = date('Y-m-d', strtotime('this week next saturday'));
    echo $week_start;
    echo $week_end;


    but there's no such easy way with date&time, isnt?!

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,363
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    No. MMF2 really lacks a good datetime object. The date & time object isn't better than your average grandfather clock. Wasn't the example in this thread helpful for this?
    http://community.clickteam.com/threads/80792-Calculate-days-Weeks-between-2-Dates?highlight=compare+dates

    I suppose you could use the .Net object for this, but then you'll be restricted to the Windows runtime.

Similar Threads

  1. Join up at Heathrow on friday?
    By Popcorn in forum Click Convention
    Replies: 10
    Last Post: 29th August 2013, 01:17 PM
  2. [bug] Date&time object doesn't show date
    By qenio in forum Android Export Module Version 2.0
    Replies: 3
    Last Post: 19th March 2012, 09:49 PM
  3. black friday gifts to me
    By rubes in forum iOS Export Module Version 2.0
    Replies: 4
    Last Post: 26th November 2011, 03:15 PM

Posting Permissions

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