Skip to content

Commit b4cb93c

Browse files
committed
Update README
1 parent 40c92b5 commit b4cb93c

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,11 @@ The library implements three types:
1717
- `NaiveTime` (e.g. `15:30:00`)
1818
- `NaiveDateTime` (e.g. `2017-09-29T15:30:00` - no time zone and no offset).
1919

20-
Each of the provided types implements `Equatable`, `Comparable`, `LosslessStringConvertible`, `Codable` protocols. Naive types can also be converted to `Date`, and `DateComponents`.
21-
22-
**Important!** The naive types do not perform any validation of the input components (year, hour, etc). If you do need to do any precise manipulations with time use native `Date` and `Calendar` types.
20+
Each of them implements `Equatable`, `Comparable`, `LosslessStringConvertible`, `Codable` protocols. Naive types can also be converted to `Date`, and `DateComponents`.
2321

2422
### Create
2523

26-
Naive dates and times can be created either from strings (using a predefined format) or by using a memberwise method:
24+
Naive dates and times can be created from a string (using a predefined format), using `Decodable`, or with a memberwise initializer:
2725

2826
```swift
2927
NaiveDate("2017-10-01")
@@ -80,6 +78,7 @@ let dateTime = NaiveDateTime(
8078
Calendar.current.date(from: dateTime)
8179
```
8280

81+
**Important!** The naive types do not perform any validation of the input components (year, hour, etc). This means the datetime may not actually exist in certain areas in the world even though it is valid. For example, when daylight saving changes are applied by a region, the clock typically moves forward or backward by one hour. This means certain datetimes never occur or may occur more than once. If you do need to do any precise manipulations with time use native `Date` and `Calendar` types.
8382

8483
## Requirements
8584

0 commit comments

Comments
 (0)