Record Brook

Hierarchy
Properties

Unit

Declaration

type Brook = record

Description

Global Brook object containing general purpose functions.

Overview

Fields

Public nested const DAYS: array[1..7] of string = ('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');
Public nested const MONTHS: array[1..12] of string = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');

Methods

Public class function FixPath(const APath: string): string; static; inline;
Public class function FixEntryPoint(const APath: string): string; static; inline;
Public class function DateTimeToUTC(ADateTime: TDateTime): TDateTime; static; inline;
Public class function DateTimeToGMT(ADateTime: TDateTime): string; static; inline;
Public class function SHA1(const S: string): string; static; inline;

Description

Fields

Public nested const DAYS: array[1..7] of string = ('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');

Holds the name of days as 'Aaa' format.

Public nested const MONTHS: array[1..12] of string = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');

Holds the name of months as 'Aaa' format.

Methods

Public class function FixPath(const APath: string): string; static; inline;

Fixes a path by including the leading path delimiter and excluding the trailing one.

Parameters
APath[in]
Path as static string.
Returns

Fixed path, e.g.: path -> /path and /path/ -> /path

Public class function FixEntryPoint(const APath: string): string; static; inline;

Extracts and fixes an entry-point by including the leading path delimiter and excluding the trailing one.

Parameters
APath[in]
Path as static string.
Returns

Fixed entry-point, e.g.: /foo/bar -> /foo

Public class function DateTimeToUTC(ADateTime: TDateTime): TDateTime; static; inline;

Converts a given local time to UTC (Coordinated Universal Time).

Parameters
ADateTime[in]
Local date/time.
Returns

Local time converted to UTC.

Public class function DateTimeToGMT(ADateTime: TDateTime): string; static; inline;

Converts a given local time to GMT (Greenwich Mean Time).

Parameters
ADateTime[in]
Local date/time.
Returns

Local time converted to GMT string.

Public class function SHA1(const S: string): string; static; inline;

Generates a given string to SHA-1 (Secure Hash Algorithm 1).

Parameters
S[in]
String to generate the SHA-1.
Returns

Generated SHA-1 as static string.


Generated by PasDoc 0.16.0.