Open Source Swift Library For Working With Dates Inspired By Moment.js

  •  
  •  
  •  
  •  
  •  

Some time ago I mentioned an objective-c library for working with dates inspired by Moment.js.

Here’s an open source Swift library from Adrian Kosmaczewski for working with dates inspired by Moment.js called SwiftMoment.

With SwiftMoment you can create, format, manipulate, calculate, and compare dates similar to how you would with Moment.js library, and also manipulate dates using some Swift features.

Here is an example showing how you can create duration values with a very clean syntax using the included Int extension:

let duration = 5.hours + 56.minutes

And how you can easily create dates:

let yesterday = moment("2015-01-19")

You can find SwiftMoment on Github here.

An excellent Swift library for working with dates.


  •  
  •  
  •  
  •  
  •