TDateTimeHelper¶
Declaration¶
Source position: dateutil.inc line 505
type
TDateTimeHelper = type helper for TDateTime
public
class function Create(const aYear: Word; const aMonth: Word;
const aDay: Word) : TDateTime; overload;
class function Create(const aYear: Word; const aMonth: Word;
const aDay: Word; const aHour: Word;
const aMinute: Word; const aSecond: Word;
const aMillisecond: Word) : TDateTime; overload;
class function Create(Date: string; aFormat: string='';
aDateSeparator: char=#0; aTimeSeparator: char=#0)
: TDateTime; overload;
class function CreateLocal : TDateTime;
class function CreateUnixTime : TDateTime;
class function CreateTotalSeconds : TDateTime;
class property Now: TDateTime; {r}
class property Today: TDateTime; {r}
class property Yesterday: TDateTime; {r}
class property Tomorrow: TDateTime; {r}
function GetDate : TDateTime;
function GetTime : TDateTime;
function ToString : string;
function Format : string;
function StartOfYear : TDateTime;
function EndOfYear : TDateTime;
function StartOfMonth : TDateTime;
function EndOfMonth : TDateTime;
function StartOfWeek : TDateTime;
function EndOfWeek : TDateTime;
function StartOfDay : TDateTime;
function EndOfDay : TDateTime;
function AddYears : TDateTime;
function AddMonths : TDateTime;
function AddDays : TDateTime;
function AddHours : TDateTime;
function AddMinutes : TDateTime;
function AddSeconds : TDateTime;
function AddMilliseconds : TDateTime;
function CompareTo : TValueRelationship;
function Equals : Boolean;
function IsSameDay : Boolean;
function InRange : Boolean;
function IsInLeapYear : Boolean;
function IsToday : Boolean;
function IsAM : Boolean;
function IsPM : Boolean;
function YearsBetween : Integer;
function MonthsBetween : Integer;
function WeeksBetween : Integer;
function DaysBetween : Integer;
function HoursBetween : Int64;
function MinutesBetween : Int64;
function SecondsBetween : Int64;
function MilliSecondsBetween : Int64;
function WithinPastYears : Boolean;
function WithinPastMonths : Boolean;
function WithinPastWeeks : Boolean;
function WithinPastDays : Boolean;
function WithinPastHours : Boolean;
function WithinPastMinutes : Boolean;
function WithinPastSeconds : Boolean;
function WithinPastMilliSeconds : Boolean;
function WithinYears : Boolean;
function WithinMonths : Boolean;
function WithinWeeks : Boolean;
function WithinDays : Boolean;
function WithinHours : Boolean;
function WithinMinutes : Boolean;
function WithinSeconds : Boolean;
function WithinMilliseconds : Boolean;
property Date: TDateTime; {r}
property Time: TDateTime; {r}
property DayOfWeek: Word; {r}
property DayOfYear: Word; {r}
property Year: Word; {r}
property Month: Word; {r}
property Day: Word; {r}
property Hour: Word; {r}
property Minute: Word; {r}
property Second: Word; {r}
property Millisecond: Word; {r}
property UnixTime: Int64; {r}
property TotalSeconds: Int64; {r}
end;
Inheritance¶
Properties¶
| Member | Visibility | Description |
|---|---|---|
| Date read only | public | |
| Day read only | public | |
| DayOfWeek read only | public | |
| DayOfYear read only | public | |
| Hour read only | public | |
| Millisecond read only | public | |
| Minute read only | public | |
| Month read only | public | |
| Now read only | public | |
| Second read only | public | |
| Time read only | public | |
| Today read only | public | |
| Tomorrow read only | public | |
| TotalSeconds read only | public | |
| UnixTime read only | public | |
| Year read only | public | |
| Yesterday read only | public |