record TgoBsonDateTime

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TgoBsonDateTime = record

Description

A BSON DateTime value

Overview

Methods

class function Create(const ADateTime: TDateTime; const ADateTimeIsUTC: Boolean): TgoBsonDateTime; overload; static;
class function Create(const AMillisecondsSinceEpoch: Int64): TgoBsonDateTime; overload; static;
class operator Implicit(const A: TgoBsonDateTime): TgoBsonValue; static;
class operator Equal(const A, B: TgoBsonDateTime): Boolean; static;
class operator NotEqual(const A, B: TgoBsonDateTime): Boolean; static;
function IsNil: Boolean; inline;
procedure SetNil; inline;
function Clone: TgoBsonDateTime; inline;
function DeepClone: TgoBsonDateTime; inline;
function ToBson: TBytes; inline;
function ToJson: String; overload; inline;
function ToJson(const ASettings: TgoJsonWriterSettings): String; overload; inline;
function ToLocalTime: TDateTime; inline;
function ToUniversalTime: TDateTime; inline;

Properties

property MillisecondsSinceEpoch: Int64 read GetMillisecondsSinceEpoch;

Description

Methods

class function Create(const ADateTime: TDateTime; const ADateTimeIsUTC: Boolean): TgoBsonDateTime; overload; static;

Creates a BSON DateTime value from a Delphi DateTime value.

Parameters
ADateTime
the (Delphi) date time value
ADateTimeIsUTC
whether ADateTime is in universal time
Returns

The BSON DateTime value

class function Create(const AMillisecondsSinceEpoch: Int64): TgoBsonDateTime; overload; static;

Creates a BSON DateTime value.

Parameters
AMillisecondsSinceEpoch
the number of milliseconds since the Unix epoch.
Returns

The BSON DateTime value

class operator Implicit(const A: TgoBsonDateTime): TgoBsonValue; static;

Implicitly casts a BSON DateTime value to a BSON value.

class operator Equal(const A, B: TgoBsonDateTime): Boolean; static;

See TgoBsonValue.Equal

class operator NotEqual(const A, B: TgoBsonDateTime): Boolean; static;

See TgoBsonValue.NotEqual

function IsNil: Boolean; inline;

See TgoBsonValue.IsNil

procedure SetNil; inline;

See TgoBsonValue.SetNil

function Clone: TgoBsonDateTime; inline;

See TgoBsonValue.Clone

function DeepClone: TgoBsonDateTime; inline;

See TgoBsonValue.DeepClone

function ToBson: TBytes; inline;

See TgoBsonValue.ToBson

function ToJson: String; overload; inline;

See TgoBsonValue.ToJson

function ToJson(const ASettings: TgoJsonWriterSettings): String; overload; inline;

See TgoBsonValue.ToJson

function ToLocalTime: TDateTime; inline;

Converts the DateTime value to a Delphi DateTime value in local time

function ToUniversalTime: TDateTime; inline;

Converts the DateTime value to a Delphi DateTime value in universal time

Properties

property MillisecondsSinceEpoch: Int64 read GetMillisecondsSinceEpoch;

The number of milliseconds since the Unix epoch


Generated by P2PasDoc 0.13.0 on 2017-04-25 12:54:26