[swift-corelibs-dev] [swift-evolution] Proposal: Conforming NSDate to Comparable

David Waite david at alkaline-solutions.com
Sat Dec 5 21:48:14 CST 2015


Both NSDate nor NSTimeInterval represent instants in time, not time within a calendaring system. Assuming 86400 seconds is a calendar day is a bug, same as assuming 365 days is a calendar year. That they are using the wrong time primitive doesn’t seem to be affected by whether NSDate implements Strideable or not.

(That there isn’t a comprehensive time system is another problem)

-DW

> On Dec 5, 2015, at 8:10 PM, Pierre Habouzit via swift-evolution <swift-evolution at swift.org> wrote:
> 
> 
> NSDate (and dates/timestamps in general) is a poor choice for Strideable, because, DST.
> A Calendar using this interface for a repeating event would be broken using this. Or you would break anyone who really wants to iterate every fixed 86400 seconds.
> 
> -Pierre

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-corelibs-dev/attachments/20151205/f6e240e7/attachment.html>


More information about the swift-corelibs-dev mailing list