SwiftMoment
SwiftMoment copied to clipboard
A time and calendar manipulation library for iOS 9+, macOS 10.11+, tvOS 9+, watchOS 2+ written in Swift 4.
Is it already possible to treat with future dates like we do past dates with fromNow() -> ".. ago" ? eg. "tomorrow", "in 5 seconds", "in 2 months", "in 4...
## Detailed Description When I try to parse the date in specific format I get one year backdate. ## Possible Implementation `let day = moment("178-06-2019", dateFormat: "DD-MM-YYYY")` returns // 2018-12-23...
I'm trying to get tomorrow's date like this, but it just returns today's. moment().add(1, "days").format("MMMM do") This works fine in Javascript moment().add(1, "days").format("MMMM Do") ## Your Environment Swift 4.0 Xcode...
I'm having problems running the framework in Swift 4 the project simply stops running when it comes to checking the framework SwiftMoment I'm in the latest version of Swift 4...
How do you get hour in military time (0-23) vs. (1-12)? moment().hour // returns 1-12
It seems to subtract 30 days instead of 1 whole month. ## Detailed Description If the starting date is 1/30/2018, and I subtract 1 month, it becomes 12/31/2017, I would...
## Detailed Description `getLanguageBundle` is returning nil. Strangely, `locale.identifier` is returning `zh-TW`, without the "Hant". The 2nd part of `getLanguageBundle` therefore only get the language code as `zh`. Since now...
## Detailed Description When I use the `moment().endOf("M")` in many 31 days months, as December, the return is the day 30th. `moment().endOf("M").format("dd/MM/YYYY")` return 30/12/2017 ## Context I use this to...
SwiftMoment ignores the timezone from an iso8601 string formatted date even if it's specified. Example: The code `print(moment("2017-02-09T03:17:52.477Z")!.format("yyyy-MM-dd'T'HH:mm:ss.SSSXXXXX"))` displays: `2017-02-09T03:17:52.477-05:00` the expected output is either `2017-02-09T03:17:52.477Z` or `2017-02-08T22:17:52.477-05:00` from Wikipedia:...
In momentjs, we simply do `moment().utc().format()`, how would we accomplish this in SwiftMoment? For completion, this is what I ended up doing using `Date()` and `TimeFormatter()` ``` let UTCDate =...