malcommac / SwiftDate

🐔 Toolkit to parse, validate, manipulate, compare and display dates, time & timezones in Swift.
MIT License
7.64k stars 768 forks source link

Wrong time when using dateAt(.startOfMonth) #745

Closed mligor closed 4 years ago

mligor commented 4 years ago

https://github.com/malcommac/SwiftDate/blob/f1e50fac61c594cad7e085dedbd6b131eac04771/Sources/SwiftDate/DateInRegion/DateInRegion%2BCreate.swift#L407

When dateAt(.startOfMonth) is used, you will get e.g. 1.08.2020 01:01:01, what is not start of the month. Time should be set to 00:00:00

malcommac commented 4 years ago

fixed in #700 in 6.2.0