Package org.robovm.apple.foundation
Class NSDate
- java.lang.Object
-
- org.robovm.rt.bro.NativeObject
-
- org.robovm.objc.ObjCObject
-
- org.robovm.apple.foundation.NSObject
-
- org.robovm.apple.foundation.NSDate
-
- All Implemented Interfaces:
NSObjectProtocol
,NSPropertyList
,org.robovm.objc.ObjCProtocol
public class NSDate extends NSObject implements NSPropertyList
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NSDate.Notifications
static class
NSDate.NSDatePtr
-
Nested classes/interfaces inherited from class org.robovm.apple.foundation.NSObject
NSObject.Handle, NSObject.Marshaler, NSObject.NoRetainMarshaler, NSObject.NSKeyValueObserver, NSObject.NSObjectPtr, NSObject.SkipInit
-
-
Field Summary
Fields Modifier and Type Field Description static double
TimeIntervalSince1970
-
Fields inherited from class org.robovm.apple.foundation.NSObject
FLAG_NO_RETAIN
-
-
Constructor Summary
Constructors Modifier Constructor Description NSDate()
NSDate(double secs)
NSDate(java.util.Date date)
protected
NSDate(NSObject.Handle h, long handle)
protected
NSDate(NSObject.SkipInit skipInit)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NSComparisonResult
compare(NSDate other)
static NSDate
createWithTimeIntervalSince1970(double secs)
static NSDate
createWithTimeIntervalSinceDate(double secsToBeAdded, NSDate date)
static NSDate
createWithTimeIntervalSinceNow(double secs)
static NSDate
createWithTimeIntervalSinceReferenceDate(double ti)
NSDate
earlierDate(NSDate anotherDate)
boolean
equalsTo(NSDate otherDate)
static NSDate
getDistantFuture()
static NSDate
getDistantPast()
double
getTimeIntervalSince(NSDate anotherDate)
double
getTimeIntervalSince1970()
double
getTimeIntervalSinceNow()
double
getTimeIntervalSinceReferenceDate()
protected long
init(double secs)
NSDate
laterDate(NSDate anotherDate)
NSDate
newDateByAddingTimeInterval(double ti)
static NSDate
now()
static NSString
SystemClockDidChangeNotification()
java.util.Date
toDate()
java.lang.String
toString(NSLocale locale)
-
Methods inherited from class org.robovm.apple.foundation.NSObject
addKeyValueObserver, addKeyValueObserver, afterMarshaled, alloc, autorelease, autorelease, awakeFromNib, conformsToProtocol, copy, description, didChangeValue, didChangeValue, didChangeValues, doDispose, equals, forceSkipInit, getAutoContentAccessingProxy, getClassForCoder, getClassForKeyedArchiver, getKeyValueCoder, getObservationInfo, hash, hashCode, init, isEqual, isKindOfClass, isMemberOfClass, mutableCopy, performSelector, performSelector, performSelector, performSelector, performSelector, performSelector, performSelector, performSelectorInBackground, performSelectorOnMainThread, performSelectorOnMainThread, performSelectorV, performSelectorV, performSelectorV, release, release, removeKeyValueObserver, removeKeyValueObservers, respondsToSelector, retain, retain, retainCount, setObservationInfo, toString, willChangeValue, willChangeValue, willChangeValues
-
-
-
-
Field Detail
-
TimeIntervalSince1970
public static final double TimeIntervalSince1970
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NSDate
public NSDate()
-
NSDate
protected NSDate(NSObject.Handle h, long handle)
-
NSDate
protected NSDate(NSObject.SkipInit skipInit)
-
NSDate
public NSDate(double secs)
-
NSDate
public NSDate(java.util.Date date)
-
-
Method Detail
-
getTimeIntervalSinceReferenceDate
public double getTimeIntervalSinceReferenceDate()
-
getTimeIntervalSinceNow
public double getTimeIntervalSinceNow()
-
getTimeIntervalSince1970
public double getTimeIntervalSince1970()
-
getDistantFuture
public static NSDate getDistantFuture()
-
getDistantPast
public static NSDate getDistantPast()
-
toDate
public java.util.Date toDate()
-
SystemClockDidChangeNotification
public static NSString SystemClockDidChangeNotification()
- Since:
- Available in iOS 4.0 and later.
-
getTimeIntervalSince
public double getTimeIntervalSince(NSDate anotherDate)
-
newDateByAddingTimeInterval
public NSDate newDateByAddingTimeInterval(double ti)
- Since:
- Available in iOS 2.0 and later.
-
compare
public NSComparisonResult compare(NSDate other)
-
equalsTo
public boolean equalsTo(NSDate otherDate)
-
toString
public java.lang.String toString(NSLocale locale)
-
init
protected long init(double secs)
-
now
public static NSDate now()
-
createWithTimeIntervalSinceNow
public static NSDate createWithTimeIntervalSinceNow(double secs)
-
createWithTimeIntervalSinceReferenceDate
public static NSDate createWithTimeIntervalSinceReferenceDate(double ti)
-
createWithTimeIntervalSince1970
public static NSDate createWithTimeIntervalSince1970(double secs)
-
-