Indy 9
TIdDateTimeStamp
Hierarchy, Properties, Methods, See Also, Unit: IdDateTimeStamp
Provides Date and Time handling for Internet Protocols. Description:

TIdDateTimeStamp is a TIdBaseComponent descendant that processes date and time values using the various formats required by some Internet Protocols.

TIdDateTimeStamp methods performs operations based on units of Milliseconds, Seconds, Days, and Years with smaller time units affecting larger time units where necessary. All other common time units are converted to these base units before processing.

TIdDateTimeStamp = class(TIdBaseComponent)
Unit
IdDateTimeStamp

TIdDateTimeStamp.AsISO8601Calendar
TIdDateTimeStamp
The Indy timestamp as an ISO 8601 Calendar Date string.
property AsISO8601Calendar: String;
Description
AsISO8601Calendar is a read-only String property that returns the date/time in ISO 8601 Calendar Date format. For example:

  2001-01-01T00:00:01   // New Year's Day 2001
  2001-04-01T00:00:01   // April Fool's Day 2001

TIdDateTimeStamp.AsISO8601Ordinal
TIdDateTimeStamp
The Indy timestamp as an ISO 8601 Ordinal Date string.
property AsISO8601Ordinal: String;
Description
AsISO8601Ordinal is a read-only String property that returns the date/time as an ISO 8601 Ordinal Date string. For example:

  2001-1T00:00:01        // New Year's Day 2001
  2001-365T23:59:59      // New Year's Eve 2001

TIdDateTimeStamp.AsISO8601Week
TIdDateTimeStamp, See Also
The Indy timestamp as an ISO 8601 Week Date string.
property AsISO8601Week: String;
Description
AsISO8601Week is a read-only String property that returns the date and time value for the timestanmp as an ISO 8601 Week Date string. For example:

    2001-W1-2T00:00:01      // New Year's Day 2001
    2001-W52-2T23:59:59     // New Year's Eve 2001

TIdDateTimeStamp.AsRFC822
TIdDateTimeStamp
The Indy timestamp as an RFC 822 Date string,
property AsRFC822: String;
Description
AsRFC822 is a read-only String property that returns the date/time in the date format specified in RFC 822. For example:

  // New Year's Day 2001 US Eastern
  Mon, 1 Jan 2001 00:00:01 -0500

  // New Year's Eve 2001 US Eastern
  Mon, 31 Dec 2001 23:59:59 -0500

TIdDateTimeStamp.AsTDateTime
TIdDateTimeStamp, See Also
The Indy timestamp as a native Delphi TDateTime value.
property AsTDateTime: TDateTime;
Description
AsTDateTime is a read-only TDateTime property that returns the timestamp as a native Delphi TDateTime value.

TIdDateTimeStamp.AsTimeOfDay
TIdDateTimeStamp, See Also
The Time of Day in 24-hour format.
property AsTimeOfDay: String;
Description
AsTimeOFDay is a read-only String property that returns the time portion of the timestamp in the 24-hour format HH:MM:SS.

TIdDateTimeStamp.AsTTimeStamp
TIdDateTimeStamp, See Also
The Indy timestamp as a TTimeStamp value.
property AsTTimeStamp: TTimeStamp;
Description
AsTTimeStamp is a read-only TTimestamp property that returns the date and time value for the timestamp as a TTimeStamp value. AsTTimeStamp calculates the date value using Year and Day, and adjusts the TTimestamp to account for Leap years. AsTTimeStamp calculates the time value using Second and Millisecond.

TIdDateTimeStamp.BeatOfDay
TIdDateTimeStamp
The Indy timestamp as a Swatch "Beat" time value.
property BeatOfDay: Integer;
Description
BeatOFDay is a read-only Integer property that returns the Indy timestamp as a Beat time value. Beat time is defined by Swatch at (http://www.swatch.com/) and called 'Internet Time'.

TIdDateTimeStamp.Day
TIdDateTimeStamp, See Also
The Day of Year for the timestamp.
property Day: Integer;
Description
Day is an Integer property that represents the day of the Year for the timestamp value. Use AddDays to increment the current day of the Year by a specified value.

TIdDateTimeStamp.DayOfMonth
TIdDateTimeStamp, See Also
Day of Month for the Indy timestamp.
property DayOfMonth: Integer;
Description
DayOfMonth is a read-only Integer property that contains the Day of the Month for the timestamp value. DayOfMonth calculates the return value using the values from Day and MonthOfYear.

TIdDateTimeStamp.DayOfWeek
TIdDateTimeStamp, See Also
The Day of Week for the Indy timestamp.
property DayOfWeek: Integer;
Description
DayOfWeek is a read-only Integer property that contains the Day of the Week for the Indy timestamp. DayOfWeek will contain a value in the range 1..7.

TIdDateTimeStamp.DayOfWeekName
TIdDateTimeStamp, See Also
The Day of Week Name for the Indy timestamp.
property DayOfWeekName: String;
Description
DayOfWeekName is a read-only String property that contains the long name for the day of the week represented by the Indy timestamp. DayOfWeekName relies on the DayOfWeek property to access the correct Day name. DayOfWeekName can return one of the following values:

  • Sunday

  • Monday

  • Tuesday

  • Wednesday

  • Thursday

  • Friday

  • Saturday

TIdDateTimeStamp.DayOfWeekShortName
TIdDateTimeStamp
The Short Day of Week Name for the Indy timestamp.
property DayOfWeekShortName: String;
Description
DayOfWeekShortName is a read-only String property that contains the first three characters of DayOfWeekname for the Indy timestamp. DayOfWeekShortName relies on the DayOfWeek property to access the correct Day name.

DayOfWeekShortName can return one of the following values:

  • Sun

  • Mon

  • Tue

  • Wed

  • Thu

  • Fri

  • Sat

TIdDateTimeStamp.DaysInYear
TIdDateTimeStamp, See Also
Number of days in the year for the Indy timestamp.
property DaysInYear: Integer;
Description
DaysInYear is a read-only Integer property that contains the number of days in the year represented by the Indy timestamp. DaysInYear is calculated and accounts for Leap Day in its operation.

TIdDateTimeStamp.HourOf12Day
TIdDateTimeStamp, See Also
Indicates the numeric hour of day in 12-hour format.
property HourOf12Day: Integer;
Description
HourOf12Day is a read-only Integer property that indicates the hour of the day in 12-hour format for the Indy timestamp. Only the hour in numeric format is presented. For example, the HourOf12Day value for 1:00 AM and 1:00 PM are both 1.

TIdDateTimeStamp.HourOf24Day
TIdDateTimeStamp, See Also
Indicates the numeric hour of day in 24-hour format.
property HourOf24Day: Integer;
Description
HourOf24Day is a read-only Integer property that indicates the hour of the day in 24-hour format for the Indy timestamp. Only the hour in numeric format is presented. For example, the HourOf24Day value for 1:00 AM is 1, and the HourOf24Day value for 1:00 PM is 13.

TIdDateTimeStamp.IsLeapYear
TIdDateTimeStamp, See Also
Indicates that the year for the Indy timestamp is a Leap year.
property IsLeapYear: Boolean;
Description
IsLeapYear is a read-only Boolean property that indicates if the value in Year for the timestamp is a Leap year.

TIdDateTimeStamp.IsMorning
TIdDateTimeStamp
Indicates that the time portion of the Indy timestamp is before noon.
property IsMorning: Boolean;
Description
IsMorning is a read-only Boolean property that indicates the time portion of the Indy timestamp is before noon. IsMorning is False if the time is after noon. Noon is considered to be morning, and Midnight is considered to be afternoon.

TIdDateTimeStamp.Millisecond
TIdDateTimeStamp, See Also
Number of milliseconds elapsed for the current second of the Indy timestamp.
property Millisecond: Integer;
Description
Millisecond is an Integer property that contains the number of milliseconds elapsed for the current Second in the timestamp value.

TIdDateTimeStamp.MinuteOfDay
TIdDateTimeStamp, See Also
Number of minutes elapsed in the day of the Indy timestamp.
property MinuteOfDay: Integer;
Description
MinuteOfDay is a read-only integer property that indicates the number of Minutes elapsed in the Day for the timestamp value.

TIdDateTimeStamp.MinuteOfHour
TIdDateTimeStamp, See Also
Number of minutes elapsed in the hour of the Indy timestamp.
property MinuteOfHour: Integer;
Description
MinuteOfHour is a read-only Integer property that indicates the number of minutes elapsed in the current Hour for the timestamp value.

TIdDateTimeStamp.MonthName
TIdDateTimeStamp, See Also
The long name for the month in the Indy timestamp.
property MonthName: String;
Description
MonthName is a read-only String property that represents the long name for the current month in the timestamp value. MonthName will contain one of the values defined in IdMonthNames.

TIdDateTimeStamp.MonthOfYear
TIdDateTimeStamp, See Also
Numeric month number for the Indy timestamp.
property MonthOfYear: Integer;
Description
MonthOfYear is a read-only Integer property that represents the numeric month number for the timestamp value. MonthOfYear is calculated using the value in Day, and accounts for Leap years in the returned value.

TIdDateTimeStamp.MonthShortName
TIdDateTimeStamp, See Also
The short name for the month in the Indy timestamp.
property MonthShortName: String;
Description
MonthShortName is a read-only String property that represents the short name for the month in the Indy timestamp. MonthShortName returns the first three characters of the month name represented in the Indy timestamp.

TIdDateTimeStamp.Second
TIdDateTimeStamp, See Also
Second of the day.
property Second: Integer;
Description
Second is an Integer property that indicates the current second of the day for the object. Second should always contain a value in the range 0..IdSecondsInDay.

TIdDateTimeStamp.SecondOfMinute
TIdDateTimeStamp, See Also
Numeric seconds elapsed in the current minute of the Indy timestamp.
property SecondOfMinute: Integer;
Description
SecondOfMinute is a read-only Integer property that represents the numeric seconds elapsed in the current minute for the timestamp value.

TIdDateTimeStamp.SecondsInYear
TIdDateTimeStamp
Total number of seconds in the year for the Indy timestamp.
property SecondsInYear: Integer;
Description
SecondsInYear is a read-only Integer property that represents the total number of seconds in the year for the Indy timestamp. If the current year is a Leap year, SecondsInYear will contain the value from IdSecondsInLeapYear. Otherwise, SecondsInYear will contain the value from IdSecondsInYear.

TIdDateTimeStamp.TimeZone
TIdDateTimeStamp
Identifies the Time Zone for the Indy timestamp.
property TimeZone: Integer;
Description
TimeZone is an Integer property that Identifies the Time Zone for the Indy timestamp. TimeZone contains a value that reflects the number of hours offset from GMT or UTC. TimeZone is not used when the Indy timestamp is updated, and is generally used in construction of the AsRFC822 timestamp format.

TIdDateTimeStamp.TimeZoneAsString
TIdDateTimeStamp
Returns the timezone offset in hours and minutes from GMT.
property TimeZoneAsString: String;
Description
TimeZoneAsString is a read-only String property that indicates the positive or negative offset hours and minutes for the local timezone from GMT (Greenwich Mean Time). TimeZoneAsString is expressed in a format like '+HHMM' or '-HHMM'.

TimeZoneAsString is used when constructing an RFC-complaint date time value using GetAsRFC882.

TimeZoneAsString implements GetTimeZoneAsString as the read access specifier for the property value.


TIdDateTimeStamp.TimeZoneHour
TIdDateTimeStamp
Number of hours offset from GMT.
property TimeZoneHour: Integer;
Description
TimeZoneHour is a read-only Integer property that represents the positive or negative number of hours the local timezone is offset from GMT (Greenwich Mean Time). TimeZoneHour is used in constructing the value for TimeZoneAsString. TimeZoneHour implements GetTimeZoneHour as the read access specifier for the property value.

TIdDateTimeStamp.TimeZoneMinutes
TIdDateTimeStamp, See Also
Number of minutes as an offset from GMT.
property TimeZoneMinutes: Integer;
Description
TimeZoneMinutes is an read-only Integer property that represents the positive or negative offset minutes of the local timezone from GMT (Greenwich Mean Time). TimeZoneMinutes is used with TimeZoneHour in constructing the value in TimeZoneAsString. TimeZoneMinutes implements GetTimeZoneMinutes as the read access specifier for the property value.

TIdDateTimeStamp.WeekOfYear
TIdDateTimeStamp
Identifies the week number for the Indy timestamp.
property WeekOfYear: Integer;
Description
WeekOFYear is a read-only Integer property that Indicates the week number for the current year of the Indy timestamp. A week is considered to begin with Sunday and may overlap a Year boundary. It is possible to have 53 weeks in a Year, with the 53rd week of a given year also being the 1st week of the following year.

TIdDateTimeStamp.Year
TIdDateTimeStamp, See Also
Numeric year for the Indy timestamp.
property Year: Integer;
Description
Year is an Integer property that contains the numeric year number for the date in the timestamp value. Changing the value in Year forces the property to contain a value no less than 1, and updates IsLeapYear to reflect if the new property value is a Leap year.

TIdDateTimeStamp.AddDays
TIdDateTimeStamp, See Also
Adds a number of days to the timestamp.
procedure AddDays(ANumber: Cardinal);
Parameters
ANumber: Cardinal
Number of days to be added.
Description
AddDays is a procedure that adds the number of days specified in ANumber to the current date and time value for the timestamp. Year will be adjusted accordingly.

TIdDateTimeStamp.AddHours
TIdDateTimeStamp, See Also
Adds a number of hours to the timestamp.
procedure AddHours(ANumber: Cardinal);
Parameters
ANumber: Cardinal
Number of hours to add.
Description
AddHours is a procedure that adds the number of hours in ANumber to the current date and time vzalue for the timestamp. Second, Day and Year will be adjusted accordingly.

TIdDateTimeStamp.AddMilliseconds
TIdDateTimeStamp, See Also
Adds a number of milliseconds to the timestamp.
procedure AddMilliseconds(ANumber: Cardinal);
Parameters
ANumber: Cardinal
Number of milliseconds to be added.
Description
AddMilliseconds is a procedure that adds the number of milliseconds to the date and time value in the timestamp. Second, Day and Year will be adjusted accordingly.

TIdDateTimeStamp.AddMinutes
TIdDateTimeStamp, See Also
Adds a number of minutes to the timestamp.
procedure AddMinutes(ANumber: Cardinal);
Parameters
ANumber: Cardinal
Number of minutes to add.
Description
AddMinutes is a procedure that adds the number of minutes in ANumber to the date and time value in the timestamp. Second, Day and Year will be adjusted accordingly.

TIdDateTimeStamp.AddMonths
TIdDateTimeStamp, See Also
Adds a number of months to the timestamp.
procedure AddMonths(ANumber: Cardinal);
Parameters
ANumber: Cardinal
Number of months to be added.
Description
AddMonths is a procedure that adds the number of months in ANumber to the date and time value in the timestamp. Day and Year will be adjusted accordingly.

TIdDateTimeStamp.AddSeconds
TIdDateTimeStamp, See Also
Adds a number of seconds to the timestamp.
procedure AddSeconds(ANumber: Cardinal);
Parameters
ANumber: Cardinal
Number of seconds to be added.
Description
AddSeconds is a procedure that adds the number of seconds in ANumber to the date and time value in the timestamp. Second, Day and Year will be adjusted accordingly.

TIdDateTimeStamp.AddTDateTime
TIdDateTimeStamp
Adds a native Delphi date/time to the timestamp.
procedure AddTDateTime(ADateTime: TDateTime);
Parameters
ADateTime: TDateTime
Number of days, hours, and seconds to be added in native Delphi format.
Description
AddTDateTime is a procedure that adds the date/time pair specified in ADateTime to the timestamp. ADateTime is converted to a TTimeStamp and it's component parts are added. Milliseconds, Seconds, Day and Year are adjusted accordingly.

TIdDateTimeStamp.AddTIdDateTimeStamp
TIdDateTimeStamp
Adds an Indy timestamp to the object instance.
procedure AddTIdDateTimeStamp(AIdDateTime: TIdDateTimeStamp);
Parameters
AIdDateTime: TIdDateTimeStamp
Timestamp to be added to the object instance.
Description
AddTIdDateTimeStamp is a procedure that adds the date and time in ATIdDateTimeStamp to the current date/time for the object instance. Milliseconds, Seconds, Day and Year are adjusted accordingly.

TIdDateTimeStamp.AddTTimeStamp
TIdDateTimeStamp
Adds a TTimestamp value to the Indy timestamp.
procedure AddTTimeStamp(ATimeStamp: TTimeStamp);
Parameters
ATimeStamp: TTimeStamp
The TTimestamp to be added to the object instance.
Description
AddTTimeStamp is a procedure that adds the value of ATimestamp to the date/time for the object instance. Components of the TTimestamp are added to the date/time individually. Milliseconds, Seconds, Day and Year are adjusted accordingly.

TIdDateTimeStamp.AddWeeks
TIdDateTimeStamp, See Also
Adds a number of weeks to the timestamp.
procedure AddWeeks(ANumber: Cardinal);
Parameters
ANumber: Cardinal
Number of weeks to be added.
Description
AddWeeks is a procedure that adds the number of weeks in ANumber to the date and time value in the timestamp. Day and Year are adjusted accordingly.

TIdDateTimeStamp.AddYears
TIdDateTimeStamp, See Also
Adds a number of years to the timestamp.
procedure AddYears(ANumber: Cardinal);
Parameters
ANumber: Cardinal
Number of years to be added.
Description
AddYears is a procedure that adds the number of years specified in ANumber to the date and time value in the timestamp. After adding the specified number of years, IsLeapYear will be updated for the new Year value.

TIdDateTimeStamp.Create
TIdDateTimeStamp
Constructor for the object instance.
constructor Create(AOwner: TComponent); override;
Parameters
AOwner: TComponent
Owner of the object instance.
Description
Create is the constructor for the object instance, and relies on the inherited Create method. Create initializes the internal variables for the object instance to contain values that indicate the date:

  1st January 1 AD, 00:00:01.001

TimeZone is initially set to the value 0 (zero).


TIdDateTimeStamp.Destroy
TIdDateTimeStamp, See Also
Frees the object instance.
destructor Destroy; override;
Description
Destroy is the destructor for the object instance. Destroy calls the inherited Destroy method to free the object instance.

TIdDateTimeStamp.GetAsISO8601Calendar
TIdDateTimeStamp, See Also
Provides access to the Indy timestamp in ISO 8601 Calendar format.
function GetAsISO8601Calendar: String;
Description
GetAsISO8601Calendar is a String function that acts as the read access specifier for the AsISO8601Calendar property.

TIdDateTimeStamp.GetAsISO8601Ordinal
TIdDateTimeStamp, See Also
Provides access to the Indy timestamp in ISO 8601 Ordinal format.
function GetAsISO8601Ordinal: String;
Description
GetAsISO8601Ordinal is a String function that acts as the read access specifier for the AsISO8601Ordinal property.

TIdDateTimeStamp.GetAsISO8601Week
TIdDateTimeStamp, See Also
Provides access to the Indy timestamp in ISO 8601 Week format.
function GetAsISO8601Week: String;
Description
GetAsISO8601Week is a String function that acts as the read access specifier for the AsISO8601Week property.

TIdDateTimeStamp.GetAsRFC822
TIdDateTimeStamp, See Also
Provides access to the Indy timestamp in RFC 822 format.
function GetAsRFC822: String;
Description
GetAsRFC822 is a String function that acts as the read access specifier for the AsRFC822 property. The time value is returned in RFC 822-compliant format. For example:

      // New Year's Day 2001 US Eastern
      Mon, 1 Jan 2001 00:00:01 -0500

      // New Year's Eve 2001 US Eastern
      Mon, 31 Dec 2001 23:59:59 -0500

TIdDateTimeStamp.GetAsTDateTime
TIdDateTimeStamp, See Also
Provides access to the Indy timestamp as a TDateTime value.
function GetAsTDateTime: TDateTime;
Description
GetAsTDateTime is a TDateTime function that acts as the read access specifier for the AsTDateTime property.

TIdDateTimeStamp.GetAsTimeOfDay
TIdDateTimeStamp, See Also
Provides access to the Indy timestamp as a 24-hour time string.
function GetAsTimeOfDay: String;
Description
GetAsTimeOFDay is a String function that acts as the read access specifier for the AsTimeOfDay property.

TIdDateTimeStamp.GetAsTTimeStamp
TIdDateTimeStamp, See Also
Provides access to the Indy timestamp as a TTimeStamp value.
function GetAsTTimeStamp: TTimeStamp;
Description
GetAsTTimeStamp is a TTimeStamp function that acts as the read access specifier for the AsTTimeStamp property. GetAsTTimeStamp adjusts the date in the TTimestamp return value to account for the presence of Leap Year and Leap Day. GetAsTTimeStamp also adjusts the time in the TTimestamp return value to set both the number of seconds and milliseconds for the time value.

TIdDateTimeStamp.GetBeatOfDay
TIdDateTimeStamp, See Also
Provides access to the Indy timestamp as a Swatch "Beat Time" value.
function GetBeatOfDay: Integer;
Description
GetBeatOFDay is an Integer function that acts as the read access specifier for the BeatOfDay property.

TIdDateTimeStamp.GetDayOfMonth
TIdDateTimeStamp, See Also
Provides access to the Day of Month for the Indy timestamp.
function GetDayOfMonth: Integer;
Description
GetDayOfMonth is an Integer function that acts as the read access specifier for the DayOfMonth property.

TIdDateTimeStamp.GetDayOfWeek
TIdDateTimeStamp, See Also
Provides access to the Day of Week for the Indy timestamp.
function GetDayOfWeek: Integer;
Description
GetDayOfWeek is an Integer function that acts as the read access specifier for the DayOfWeek property.

TIdDateTimeStamp.GetDayOfWeekName
TIdDateTimeStamp, See Also
Provides access to the long Day of Week name for the Indy timestamp.
function GetDayOfWeekName: String;
Description
GetDayOfWeekName is a String function that acts as the read access specifier for the DayOfWeekName property.

TIdDateTimeStamp.GetDayOfWeekShortName
TIdDateTimeStamp, See Also
Provides access to the short Day of Week name for the Indy timestamp.
function GetDayOfWeekShortName: String;
Description
GetDayOfWeekShortName is a String function that acts as the read access specifier for the DayOfWeekShortName property.

TIdDateTimeStamp.GetDaysInYear
TIdDateTimeStamp, See Also
Provides access to the number of days in the year of the Indy timestamp.
function GetDaysInYear: Integer;
Description
GetDaysInYear is an Integer function to acts as the read access specifier for the DaysInYear property.

TIdDateTimeStamp.GetHourOf12Day
TIdDateTimeStamp, See Also
Provides access to the AM/PM hour of Day for the Indy timestamp.
function GetHourOf12Day: Integer;
Description
GetHourOf12Day is an Integer function that acts as the read access specifier for the HourOf12Day property.

TIdDateTimeStamp.GetHourOf24Day
TIdDateTimeStamp, See Also
Provides access to the Military hour of Day for the timestamp value.
function GetHourOf24Day: Integer;
Description
GetHourOf24Day is an Integer function that acts as the read access specifier for the HourOf24Day property.

TIdDateTimeStamp.GetIsMorning
TIdDateTimeStamp, See Also
Indicates that the timestamp value contains a time before noon.
function GetIsMorning: Boolean;
Description
GetIsMorning is a Boolean function that acts as the read access specifier for the IsMorning property.

TIdDateTimeStamp.GetMinuteOfDay
TIdDateTimeStamp, See Also
Provides access to the minute of the Day for the timestamp value.
function GetMinuteOfDay: Integer;
Description
GetMinuteOfDay is an Integer function that acts as the read access specifier for the MinuteOfDay property.

TIdDateTimeStamp.GetMinuteOfHour
TIdDateTimeStamp, See Also
Provides access to the minute of the hour for the timestamp value.
function GetMinuteOfHour: Integer;
Description
GetMinuteOfHour is an Integer function that acts as the read access specifier for the MinuteOfHour property.

TIdDateTimeStamp.GetMonthName
TIdDateTimeStamp, See Also
Provides access to the long month name for the timestamp value.
function GetMonthName: String;
Description
GetMonthName is a String function that acts as the read access specifier for the MonthName property.

TIdDateTimeStamp.GetMonthOfYear
TIdDateTimeStamp, See Also
Provides access to the numeric month of year for the Indy timestamp.
function GetMonthOfYear: Integer;
Description
GetMonthOfYear is an Integer function that acts as the read access specifier for the MonthOfYear property.

TIdDateTimeStamp.GetMonthShortName
TIdDateTimeStamp, See Also
Provides access to the short month name for the Indy timestamp.
function GetMonthShortName: String;
Description
GetMonthShortName is a String function that acts as the read access specifier for the MonthShortName property.

TIdDateTimeStamp.GetSecondOfMinute
TIdDateTimeStamp, See Also
Provides access to the seconds of the current minute for the Indy timestamp.
function GetSecondOfMinute: Integer;
Description
GetSecondOfMinute is an Integer function that acts as the read access specifier for the SecondOfMinute property.

TIdDateTimeStamp.GetSecondsInYear
TIdDateTimeStamp, See Also
Indicates the total number of seconds in the Indy timestamp year.
function GetSecondsInYear: Integer;
Description
GetSecondsInYear is an Integer function that acts as the read access specifier for the SecondsInYear property.

TIdDateTimeStamp.GetTimeZoneAsString
TIdDateTimeStamp
Offset of the local timezone from GMT.
function GetTimeZoneAsString: String;
Return Value
String - Offest hours and minutes from GMT.
Description
GetTimeZoneAsString is a String function that returns a value that indicates the offset of the local time zone from GMT (Greenwich Mean Time). THe value is expressed as a positive or negative number of hours and minutes from UTC. For example:

      -0500
      +0000
      +0300

GetTimeZoneAsString calls GetTimeZoneHour and GetTimeZoneMinutes to calculate the offset from UTC. GetTimeZoneAsString is used as the read access specifier for the TimeZoneAsString property.


TIdDateTimeStamp.GetTimeZoneHour
TIdDateTimeStamp
Number of hours between the local timezone and GMT time.
function GetTimeZoneHour: Integer;
Return Value
Integer - Number of hours between the local timezone and GMT time.
Description
GetTimeZoneHour is an Integer function that returns the number of hours between the local timezone and GMT time. GetTimeZoneHour is the read access specifier for the TimeZoneHour property, and is calculated using TimeZone.

TIdDateTimeStamp.GetTimeZoneMinutes
TIdDateTimeStamp
Number of minutes between the local timezone and GMT time.
function GetTimeZoneMinutes: Integer;
Return Value
Integer - Number of minutes as an offset between the local timezone and GMT time.
Description
GetTimeZoneMinutes is an Integer function that returns the number of minutes as an offset between the local timezone and GMT time. GetTimeZoneMinutes is the read access specifier for the TimeZoneMinutes property, and is calculated using the value in TimeZone.

TIdDateTimeStamp.GetWeekOfYear
TIdDateTimeStamp, See Also
Provides access to the week number for the Indy timestamp year.
function GetWeekOfYear: Integer;
Description
GetWeekOfYear is an Integer function that acts as the read access specifier for the WeekOfYear property.

TIdDateTimeStamp.SetDay
TIdDateTimeStamp, See Also
Updates the Day of Year for the Indy timestamp.
procedure SetDay(ANumber: Integer);
Parameters
ANumber: Integer
Day number to assign to the Indy timestamp.
Description
SetDay is a procedure used to update the Day property for the Indy timestamp. ANumber is the day of year to be assigned to the Indy timestamp. SetDay changes the Day property to 0 (zero) and calls AddDays using the value in ANumber to adjust the Indy timestamp.

TIdDateTimeStamp.SetFromDOSDateTime
TIdDateTimeStamp, See Also
Calculates the timestamp value from a date and time in DOS format.
procedure SetFromDOSDateTime(ADate: Word; ATime: Word);
Parameters
ADate: Word
DOS date value.
ATime: Word
DOS time value.
Description
SetFromDOSDateTime is a procedure used to set the timestamp value from Word values expressed in DOS Date and Time format. SetFromDOSDateTime call Zero to reset the timestamp to it's default values, and sets the initial year to 1980 prior to applying the ADate and ATime values.

TIdDateTimeStamp.SetFromISO8601
TIdDateTimeStamp
Sets the date and time from an ISO 8601 time value.
procedure SetFromISO8601(AString: String);
Parameters
AString: String
Date and time in ISO 8601 format.
Description
SetFromISO8601 is a procedure that the date and time components in TIdDateTimeStamp using the ISO 8601 date time value in AString. AString may contain an ISO date value that is expressed as a Calendar, Ordinal, or Week date value. The following ISO 8601 date formats are allowed:

  • Calendar - YYYY-MM-DD.

  • Ordinal - YYYY-NNN; where NNN is the day of the year.

  • Week - YYYY-WNN-D where W is a literal character and NN is the week number for the year and D is the day of week.

AString may also contain an ISO time value expressed in HH:MM:SS format. The time format may also contain an optional prefix "T" indicating a time value.

For example, the following values all represent ISO 8601 date time values for July 4, 2001 at 1:00 PM:

  • 2001-07-04 13:00:00

  • 2001-07-04T13:00:00

  • 2001-185 13:00:00

  • 2001-185T13:00:00

  • 2001-W24-4T13:00:00

  • 2001-W24-4 13:00:00

TIdDateTimeStamp.SetFromRFC822
TIdDateTimeStamp
Sets the date and time from an RFC date and time value.
procedure SetFromRFC822(AString: String);
Parameters
AString: String
RFC-compliant date time value.
Description
SetFromRFC822 is a procedure that sets the date and time components of TIdDateTimeStamp using the RFC-compliant date and time value in AString. AString may contain values in the format:

      Fri, 7 Sep 2001 13:00:00

SetFromRFC822 calls the StrInternetToDateTime procedure in IdGlobal.pas to convert the RFC date time value.


TIdDateTimeStamp.SetFromTDateTime
TIdDateTimeStamp, See Also
Initializes the Indy timestamp from a TDateTime value.
procedure SetFromTDateTime(ADateTime: TDateTime);
Parameters
ADateTime: TDateTime
Native date/time to assign to the Indy timestamp.
Description
SetFromTDateTime is a procedure that allows assignment of the native date/time in ADateTime to the Indy timestamp. SetFromTDateTime calls SetFromTTimeStamp to implement updates to the Indy timestamp.

TIdDateTimeStamp.SetFromTTimeStamp
TIdDateTimeStamp, See Also
Initializes the Indy timestamp from a TTimeStamp value.
procedure SetFromTTimeStamp(ATimeStamp: TTimeStamp);
Parameters
ATimeStamp: TTimeStamp
Native timestamp value to assign the Indy timestamp.
Description
SetFromTTimeStamp is a procedure used to assign the native TTimeStamp value in ATimeStamp to the Indy timestamp. SetFromTTimeStamp calls SetYear, SetDay, and SetSecond to initialize the Indy timestamp to a value that corresponds to the date and time value 1/1/1 00:00:00. SetFromTTimeStamp then calls SetMillisecond using the time portion of ATimeStamp, and SetDay using the date portion of ATimeStamp.

TIdDateTimeStamp.SetMillisecond
TIdDateTimeStamp, See Also
Initializes an Indy timestamp using milliseconds.
procedure SetMillisecond(ANumber: Integer);
Parameters
ANumber: Integer
Number of milliseconds since the base date.
Description
SetMillisecond is a procedure used to initialize an Indy timestamp using the number of milliseconds in ANumber since the base date. SetMillisecond clears the Millisecond property to 0 (zero) and calls AddMilliseconds using Anumber to initialize the Indy timestamp.

TIdDateTimeStamp.SetSecond
TIdDateTimeStamp, See Also
Increments an Indy timestamp using Seconds.
procedure SetSecond(ANumber: Integer);
Parameters
ANumber: Integer
Number of seconds to be added to the Indy timestamp.
Description
SetSecond is a procedure used to increment an Indy timestamp using the number of Seconds in ANumber. SetSecond clears the Second property to 0 (zero) and calls AddSeconds using the value in ANumber.

TIdDateTimeStamp.SetTimeZone
TIdDateTimeStamp
Sets the timezone for the date time value.
procedure SetTimeZone(const Value: Integer);
Parameters
const Value: Integer
Timezone for the date time value.
Description
SetTimeZone is a procedure that sets the timezone used for the TDateTime in TIdDateTimeStamp to Value. SetTimeZone is also the write access specifier for the TimeZone property.

TIdDateTimeStamp.SetYear
TIdDateTimeStamp
Updates an Indy timestamp to reflect the specified year.
procedure SetYear(ANumber: Integer);
Parameters
ANumber: Integer
Year number to be assigned to the Indy timestamp.
Description
SetYear is a procedure used to assign the year number in ANumber to the Indy timestamp. When ANumber is 0 (zero), this is considered to be an invalid year number and no update is performed. SetYear will adjust the Indy timestamp using the CheckLeapYear method for the year specified in ANumber.

TIdDateTimeStamp.SubtractDays
TIdDateTimeStamp
Subtracts the specified number of days from the Indy timestamp.
procedure SubtractDays(ANumber: Cardinal);
Parameters
ANumber: Cardinal
Number of days to be subtracted from the Indy timestamp.
Description
SubtractDays is a procedure used to subtract the number of days specified in ANumber from the Indy timestamp. SubtractDays will adjust the Indy timestamp to reflect any change in Day or Year related to the operation.

TIdDateTimeStamp.SubtractHours
TIdDateTimeStamp
Subtracts the specified number of hours from the Indy timestamp.
procedure SubtractHours(ANumber: Cardinal);
Parameters
ANumber: Cardinal
Number of hours to be subtracted from the Indy timestamp.
Description
SubtractHours is a procedure used to subtract the number of hours specified in ANumber from the Indy timestamp. SubtractHours will adjust Seconds, Day, and Year accordingly.

TIdDateTimeStamp.SubtractMilliseconds
TIdDateTimeStamp
Subtracts the specified number of Milliseconds from the Indy timestamp.
procedure SubtractMilliseconds(ANumber: Cardinal);
Parameters
ANumber: Cardinal
Number of milliseconds to be subtracted from the Indy timestamp.
Description
SubtractMilliseconds is a procedure used to subtract the number of milliseconds specified in ANumber from the Indy timestamp. SubtractMilliseconds will adjust Milliseconds, Seconds, Day, and Year accordingly.

TIdDateTimeStamp.SubtractMinutes
TIdDateTimeStamp
Subtracts the specified number of minutes from the Indy timestamp.
procedure SubtractMinutes(ANumber: Cardinal);
Parameters
ANumber: Cardinal
Number of minutes to subtract from the Indy timestamp.
Description
SubtractMinutes is a procedure used to subtract the number of minutes specified in ANumber from the Indy timestamp. SubtractMinutes will adjust Seconds, Day, and Year accordingly.

TIdDateTimeStamp.SubtractMonths
TIdDateTimeStamp
Subtracts the specified number of months from the Indy timestamp.
procedure SubtractMonths(ANumber: Cardinal);
Parameters
ANumber: Cardinal
Number of months to subtract from the Indy timestamp.
Description
SubtractMonths is a procedure used to subtract the number of months specified in ANumber from the Indy timestamp. SubtractMonths will adjust Year accordingly.

TIdDateTimeStamp.SubtractSeconds
TIdDateTimeStamp
Subtracts the specified number of seconds from the Indy timestamp.
procedure SubtractSeconds(ANumber: Cardinal);
Parameters
ANumber: Cardinal
Number of seconds to subtract from the Indy timestamp.
Description
SubtractSeconds is a procedure used to subtract the number of seconds specified in ANumber from the Indy timestamp. SubtractSeconds will adjust Seconds, Day, and Year accordingly.

TIdDateTimeStamp.SubtractTDateTime
TIdDateTimeStamp
Subtracts a TDateTime value from the Indy timestamp.
procedure SubtractTDateTime(ADateTime: TDateTime);
Parameters
ADateTime: TDateTime
The date and time value to be subtracted from the Indy timestamp.
Description
SubtractTDateTime is a procedure used to subtract the TDateTime value specified in ADateTime from the Indy timestamp. SubtractTDateTime will adjust Milliseconds, Seconds, Day, and Year accordingly. SubtractTDateTime calls SubtractTTimeStamp to implement its operation.

TIdDateTimeStamp.SubtractTIdDateTimeStamp
TIdDateTimeStamp
Subtracts an Indy timestamp value from the current Indy timestamp.
procedure SubtractTIdDateTimeStamp(AIdDateTime: TIdDateTimeStamp);
Parameters
AIdDateTime: TIdDateTimeStamp
The Indy timestamp value to subtract from the current Indy timestamp.
Description
SubtractTIdDateTimeStamp is a procedure used to subtract the Indy timestamp specified in AIdDateTime from the current Indy timestamp. SubtractTIdDateTimeStamp will adjust Milliseconds, Seconds, Day, and Year accordingly.

TIdDateTimeStamp.SubtractTTimeStamp
TIdDateTimeStamp
Subtracts the specified TTimeStamp from the Indy timestamp.
procedure SubtractTTimeStamp(ATimeStamp: TTimeStamp);
Parameters
ATimeStamp: TTimeStamp
The TTimeStamp to be subtracted from the Indy timestamp.
Description
SubtractTTimeStamp is a procedure used to subtract the TTimeStamp value specified in ATimeStamp from the Indy timestamp. SubtractTTimeStamp will adjust Milliseconds, Seconds, Day, and Year accordingly.

TIdDateTimeStamp.SubtractWeeks
TIdDateTimeStamp
Subtracts the specified number of weeks from the Indy timestamp.
procedure SubtractWeeks(ANumber: Cardinal);
Parameters
ANumber: Cardinal
Number of weeks to subtract from the Indy timestamp.
Description
SubtractWeeks is a procedure used to subtract the number of weeks specified in ANumber from the Indy timestamp. SubtractWeeks will adjust Day and Year accordingly.

TIdDateTimeStamp.SubtractYears
TIdDateTimeStamp
Subtracts the specified number of years from the Indy timestamp.
procedure SubtractYears(ANumber: Cardinal);
Parameters
ANumber: Cardinal
Number of years to subtract from the Indy timestamp.
Description
SubtractYears is a procedure used to subtract the number of years specified in ANumber from the Indy timestamp. SubtractYears will adjust Year accordingly.

TIdDateTimeStamp.Zero
TIdDateTimeStamp, See Also
Resets the date and time values.
procedure Zero;
Description
Zero is a procedure that resets the date, time, and timezone values in TIdDateTimeStamp to their default values. Zero calls ZeroDate to reset the date component of the date time value. Zero calls ZeroTime to reset the time component of the date time value. Zero also sets TimeZone to 0 prior to exiting from the method.

TIdDateTimeStamp.ZeroDate
TIdDateTimeStamp, See Also
Resets the date value to its default representation.
procedure ZeroDate;
Description
ZeroDate is a procedure that resets the value of the date component in TIdDateTimeStamp. ZeroDate calls SetYear to set the year to 1, and calls SetDay to set the day number to 1.

TIdDateTimeStamp.ZeroTime
TIdDateTimeStamp, See Also
Resets the time value to its default representation.
procedure ZeroTime;
Description
ZeroTime is a procedure that resets the value of the time component in TIdDateTimeStamp. ZeroTime calls SetSecond and SetMillisecond to set the time to 00:00:00.000.

Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.