Date: weekday

  1. 5 years ago

    Joel_Eisenstat

    10 Feb 2019 User since 2016

    Good morning ,
    For startdate = 2019-03-01 05:00:00 +0000, startdate.weekday gives a value of 5 where I think it should be 6.
    "weekday: Int Extract weekday from the date. The weekday units are the numbers 1 through N (where for the Gregorian calendar N=7 and 1 is Sunday). "
    Thanks
    Joel
    Also at one point there was a calendar class , is this forthcoming or should I continue building a calendar object ?

  2. Joel_Eisenstat

    10 Feb 2019 User since 2016

    odd it works for Feb (6) but not Mar. (5)?

  3. marco

    10 Feb 2019 Administrator User since 2016

    @Joel_Eisenstat weekday is an OS functionality so I am 101% sure that it is correct.
    What do you mean by a calendar class? What exactly you would need?

  4. Joel_Eisenstat

    10 Feb 2019 User since 2016

    Building a calendar object to use instead of the date picker with an interface similar to the calendar app .
    A little tedious to account for the previous/net month, etc using the Date functions :(

  5. Joel_Eisenstat

    10 Feb 2019 User since 2016

    The month is done , just working on before after...

  6. marco

    11 Feb 2019 Administrator User since 2016

    Very well done!
    Seems like a perfect plugin to integrate and plugin SDK will be available soon.

  7. Joel_Eisenstat

    11 Feb 2019 User since 2016

    Actually its all in Gravity so no plug in required .

  8. Joel_Eisenstat

    11 Feb 2019 User since 2016

    Going back to the issue of weekday , tried reversing formats but still a negative result. I'll attempt to drop back to swift ( https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/DatesAndTimes/Articles/dtTimeZones.html#//apple_ref/doc/uid/20000185-BBCBDGID ) and see what adjustments are needed.

  9. Joel_Eisenstat

    13 Feb 2019 User since 2016

    got it - have to adjust for zero base list when using [ ] when converting weekday int

  10. marco

    13 Feb 2019 Administrator User since 2016

    Very well done @Joel_Eisenstat !

or Sign Up to reply!