@@ -624,9 +624,9 @@ public class NSCalendar : NSObject, NSCopying, NSSecureCoding {
624
624
Create a date with given components.
625
625
Current era is assumed.
626
626
*/
627
- public func dateWithEra ( _ eraValue : Int , year yearValue: Int , month monthValue: Int , day dayValue: Int , hour hourValue: Int , minute minuteValue: Int , second secondValue: Int , nanosecond nanosecondValue: Int ) -> NSDate ? {
627
+ public func date ( _ era : Int , year yearValue: Int , month monthValue: Int , day dayValue: Int , hour hourValue: Int , minute minuteValue: Int , second secondValue: Int , nanosecond nanosecondValue: Int ) -> NSDate ? {
628
628
let comps = NSDateComponents ( )
629
- comps. era = eraValue
629
+ comps. era = era
630
630
comps. year = yearValue
631
631
comps. month = monthValue
632
632
comps. day = dayValue
@@ -641,9 +641,9 @@ public class NSCalendar : NSObject, NSCopying, NSSecureCoding {
641
641
Create a date with given components.
642
642
Current era is assumed.
643
643
*/
644
- public func dateWithEra ( _ eraValue : Int , yearForWeekOfYear yearValue: Int , weekOfYear weekValue: Int , weekday weekdayValue: Int , hour hourValue: Int , minute minuteValue: Int , second secondValue: Int , nanosecond nanosecondValue: Int ) -> NSDate ? {
644
+ public func date ( _ era : Int , yearForWeekOfYear yearValue: Int , weekOfYear weekValue: Int , weekday weekdayValue: Int , hour hourValue: Int , minute minuteValue: Int , second secondValue: Int , nanosecond nanosecondValue: Int ) -> NSDate ? {
645
645
let comps = NSDateComponents ( )
646
- comps. era = eraValue
646
+ comps. era = era
647
647
comps. yearForWeekOfYear = yearValue
648
648
comps. weekOfYear = weekValue
649
649
comps. weekday = weekdayValue
@@ -965,7 +965,7 @@ public class NSCalendar : NSObject, NSCopying, NSSecureCoding {
965
965
Result dates have an integer number of seconds (as if 0 was specified for the nanoseconds property of the NSDateComponents matching parameter), unless a value was set in the nanoseconds property, in which case the result date will have that number of nanoseconds (or as close as possible with floating point numbers).
966
966
The enumeration is stopped by setting *stop = YES in the block and return. It is not necessary to set *stop to NO to keep the enumeration going.
967
967
*/
968
- public func enumerateDatesStartingAfterDate ( _ start : NSDate , matchingComponents comps: NSDateComponents , options opts: NSCalendarOptions , usingBlock block: ( NSDate ? , Bool , UnsafeMutablePointer < ObjCBool > ) -> Void ) { NSUnimplemented ( ) }
968
+ public func enumerateDates ( _ startingAfter : NSDate , matching comps: NSDateComponents , options opts: NSCalendarOptions , using block: ( NSDate ? , Bool , UnsafeMutablePointer < ObjCBool > ) -> Void ) { NSUnimplemented ( ) }
969
969
970
970
/*
971
971
This method computes the next date which matches (or most closely matches) a given set of components.
@@ -974,7 +974,7 @@ public class NSCalendar : NSObject, NSCopying, NSSecureCoding {
974
974
*/
975
975
public func nextDateAfterDate( _ date: NSDate , matchingComponents comps: NSDateComponents , options: NSCalendarOptions ) -> NSDate ? {
976
976
var result : NSDate ?
977
- enumerateDatesStartingAfterDate ( date, matchingComponents : comps, options: options) { date, exactMatch, stop in
977
+ enumerateDates ( date, matching : comps, options: options) { date, exactMatch, stop in
978
978
result = date
979
979
stop. pointee = true
980
980
}
@@ -1019,7 +1019,7 @@ public class NSCalendar : NSObject, NSCopying, NSSecureCoding {
1019
1019
let targetComp = NSDateComponents ( )
1020
1020
targetComp. setValue ( v, forComponent: unit)
1021
1021
var result : NSDate ?
1022
- enumerateDatesStartingAfterDate ( date, matchingComponents : targetComp, options: . MatchNextTime) { date, match, stop in
1022
+ enumerateDates ( date, matching : targetComp, options: . MatchNextTime) { date, match, stop in
1023
1023
result = date
1024
1024
stop. pointee = true
1025
1025
}
0 commit comments