Update README.md
This commit is contained in:
parent
c8d819bad6
commit
ae75e10a9b
13
README.md
13
README.md
|
@ -27,6 +27,11 @@ With _SwiftyDates_ all you need to do is this:
|
||||||
let dateString = "2018-03-08T15:49:46Z"
|
let dateString = "2018-03-08T15:49:46Z"
|
||||||
let date:Date = dateString.swiftyDateTime() // this will work
|
let date:Date = dateString.swiftyDateTime() // this will work
|
||||||
```
|
```
|
||||||
|
Likewise the other date will work too:
|
||||||
|
```swift
|
||||||
|
let dateString = "2018-03-08T15:49:46.5+03:30"
|
||||||
|
let date:Date = dateString.swiftyDateTime() // this will work
|
||||||
|
```
|
||||||
|
|
||||||
## Dates
|
## Dates
|
||||||
|
|
||||||
|
@ -36,6 +41,14 @@ let dateString = "2018-03-08"
|
||||||
let date:Date = dateString.swiftyDate() // this will work
|
let date:Date = dateString.swiftyDate() // this will work
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Times
|
||||||
|
|
||||||
|
For dates you can use:
|
||||||
|
```swift
|
||||||
|
let dateString = "9:30am"
|
||||||
|
let date:TimeInterval = dateString.swiftyTime() // this will work
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
The beauty of this library is that it will also understand other formats, for example:
|
The beauty of this library is that it will also understand other formats, for example:
|
||||||
|
|
Loading…
Reference in New Issue