Declared in | GITDateTime.h |
---|
Git objects specify their creation and other dates along with the associated time zone.
This class tracks these pieces of information and also aids in creation of the date time objects from the UNIX timestamp and time zone offsets used in stored git objects.
Date.
@property NSDate *date
GITDateTime
.h
Time Zone.
@property NSTimeZone *timeZone
GITDateTime
.h
+ (GITDateTime *)dateTimeWithDate:(NSDate *)date
Date object giving the date and time for the receiver
date time object
Creates and returns a date time object for the date in the local time zone.
GITDateTime
.h
+ (GITDateTime *)dateTimeWithDate:(NSDate *)date timeZone:(NSTimeZone *)timeZone
Date object giving the date and time for the receiver
time zone of the date and time
date time object
Creates and returns a date time object for the date in the given timeZone.
GITDateTime
.h
+ (GITDateTime *)dateTimeWithTimestamp:(NSTimeInterval)seconds timeZoneOffset:(NSString *)offset
UNIX timestamp specifying the date
Zone offset from Greenwich in "+/-HHMM" format
date time object
Creates and returns a date time object from the UNIX timestamp seconds and the string offset.
The offset is normally of the form "+0100" or "-0100", the seconds counted from the start of the UNIX Epoch which is the first of January 1970 rather than the Mac OS X Reference Date which is the first of January 2001.
GITDateTime
.h
- (id)initWithDate:(NSDate *)date
Date object giving the date and time for the receiver
date time object
Creates and returns a date time object for the date in the local time zone.
GITDateTime
.h
- (id)initWithDate:(NSDate *)date timeZone:(NSTimeZone *)timeZone
Date object giving the date and time for the receiver
time zone of the date and time
date time object
Creates and returns a date time object for the date in the given timeZone.
GITDateTime
.h
- (id)initWithTimestamp:(NSTimeInterval)seconds timeZoneOffset:(NSString *)offset
UNIX timestamp specifying the date
Zone offset from Greenwich in "+/-HHMM" format
date time object
Creates and returns a date time object from the UNIX timestamp seconds and the string offset.
The offset is normally of the form "+0100" or "-0100", the seconds counted from the start of the UNIX Epoch which is the first of January 1970 rather than the Mac OS X Reference Date which is the first of January 2001.
GITDateTime
.h
- (NSString *)stringWithFormat:(NSString *)format
The date format for the receiver. See Data Formatting Programming Guide for Cocoa for a list of the conversion specifiers permitted in date format strings.
string representation of the receiver
Returns a string representation of the receiver with the given format.
GITDateTime
.h
Last updated: 2011-2-20