Record Brook
Unit
BrookUtility
Declaration
type Brook = record
Description
Global Brook
object containing general purpose functions.
Overview
Fields
|
nested const DAYS: array[1..7] of string = ('Sun', 'Mon', 'Tue', 'Wed', 'Thu',
'Fri', 'Sat'); |
|
nested const MONTHS: array[1..12] of string = ('Jan', 'Feb', 'Mar', 'Apr', 'May',
'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); |
Methods
|
class function FixPath(const APath: string): string; static; inline; |
|
class function FixEntryPoint(const APath: string): string; static; inline; |
|
class function DateTimeToUTC(ADateTime: TDateTime): TDateTime; static; inline; |
|
class function DateTimeToGMT(ADateTime: TDateTime): string; static; inline; |
|
class function SHA1(const S: string): string; static; inline; |
Description
Fields
|
nested const DAYS: array[1..7] of string = ('Sun', 'Mon', 'Tue', 'Wed', 'Thu',
'Fri', 'Sat'); |
Holds the name of days as 'Aaa' format.
|
|
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
|
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 |
|
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 |
|
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. |
|
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. |
|
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.