Date manipulation

  1. 6 months ago

    Joel_Eisenstat

    17 Feb 2019 User since 2016

    In order to advance a date by a month a counter was used with the date function as the func always uses the current date. The console indicates the count is accurate ( 1,2,3,4,etc.) but for a reason I can't fantom the date advances at greater rate than month + count.
    // Button action
    //count = 1, starting month Date()
    var d = Date(startmonthText.text,"yyyy-MM-dd","EST");
    var dd = d.dateByAddingMonths(count);
    startmonthText.text = dd.format("yyyy-MM-dd","EST");
    count += 1;

    Any direction is appreciated.

  2. Joel_Eisenstat

    17 Feb 2019 User since 2016

    Again after hitting send got it - count is adding new date .

or Sign Up to reply!