IDBLUE logo
Public Member Functions
IDBlueTimestamp Class Reference

Public Member Functions

(byte) - year
(byte) - month
(byte) - day
(byte) - hour
(byte) - minute
(byte) - second
(void) - setYear:
(void) - setMonth:
(void) - setDay:
(void) - setHour:
(void) - setMinute:
(void) - setSecond:
(NSDate *) - toNSDate
(id) - initFromNSDate:
(id) - initFromByteArray:withIndex:
(NSString *) - toString
(id) - initFromString:

Detailed Description

IDBlueTimestamp represents a date / time retrieved from an IDBLUE device. It contains year, month, day, hour, minute and second stored as bytes, where the year is relative to the year 2000.


Member Function Documentation

- (id) initFromByteArray: (CByteArray*)  data
withIndex: (int)  index 

Initialize the IDBlueTimestamp object from an array of bytes, ordered as year, month, day, hour, minute, second.

Parameters:
datathe byte array containing the date components
indexthe index in the byte array to start copying data from.
Returns:
the IDBlueTimestamp if successful, nil otherwise
- (id) initFromNSDate: (NSDate*)  date

Initialize the IDBlueTimestamp object from an NSDate object

Parameters:
datethe date to create the IDBlueTimestamp from
Returns:
The IDBlueTimestamp
- (id) initFromString: (NSString*)  s

Initialize an IDBlueTimestamp from a string

Parameters:
sThe timestamp as a string. Must be of the form yyyy-MM-dd HH:mm:ss
Returns:
An initialized IDBlueTimestamp object if successful, nil otherwise.
Remarks:
The string passed into initFromString needs to be formatted exactly as the string returned from the toString method.
- (NSDate *) toNSDate

Gets an NSDate object that represents the current IDBlueTimestamp

- (NSString *) toString

Convert the current IDBlueTimestamp object to a string representation of the form 'yyyy-MM-dd HH:mm:ss'


The documentation for this class was generated from the following files:

 

Generated on Mon Jan 19 2015 15:47:40
Copyright © 2015 Cathexis Innovations Inc. All Rights Reserved.