TimeSpan

Overview

Type to store a span of time.

Location

  • Reference:
    • Elements.dll  .NET, .NET Standard 2.0
    • elements.jar  Cooper
    • Elements.fx  Island, ToffeeV2
    • libElements.fx  Toffee
  • Namespace: RemObjects.Elements.RTL
  • Platforms: .NET, .NET Standard 2.0, Cooper, Island, Toffee, ToffeeV2
  • Mapped to:
    • TimeSpan  .NET, .NET Standard 2.0
    • Int64  Cooper, Island
    • Double  Toffee, ToffeeV2
  • Ancestry:

 

constructor (Int64)

Creates a timespan with the given amount of ticks.

 

constructor(aTicks: Int64)

 

TimeSpan(Int64 aTicks)

 

init(_ aTicks: Int64)

 

TimeSpan(Int64 aTicks)

 

Sub New(aTicks As Int64)

Parameters:

  • aTicks:

constructor (Int32, Int32, Int32, Int32, Int32)

Creates a timespan with the given amount of days, hours, minutes, seconds, and msec.

 

constructor(d: Int32; h: Int32; m: Int32; s: Int32; ms: Int32)

 

TimeSpan(Int32 d, Int32 h, Int32 m, Int32 s, Int32 ms)

 

init(_ d: Int32, _ h: Int32, _ m: Int32, _ s: Int32, _ ms: Int32)

 

TimeSpan(Integer d, Integer h, Integer m, Integer s, Integer ms)

 

Sub New(d As Int32, h As Int32, m As Int32, s As Int32, ms As Int32)

Parameters:

  • d:
  • h:
  • m:
  • s:
  • ms:

constructor (Int32, Int32, Int32)

Creates a timespan with the given amount of hours, minutes, seconds.

 

constructor(h: Int32; m: Int32; s: Int32)

 

TimeSpan(Int32 h, Int32 m, Int32 s)

 

init(_ h: Int32, _ m: Int32, _ s: Int32)

 

TimeSpan(Integer h, Integer m, Integer s)

 

Sub New(h As Int32, m As Int32, s As Int32)

Parameters:

  • h:
  • m:
  • s:

Add (TimeSpan): TimeSpan Cooper, Island, Toffee, ToffeeV2

Add two timespans together, returning the new span.

 

method Add(ts: TimeSpan): TimeSpan

 

TimeSpan Add(TimeSpan ts)

 

func Add(_ ts: TimeSpan) -> TimeSpan

 

TimeSpan Add(TimeSpan ts)

 

Function Add(ts As TimeSpan) As TimeSpan

Parameters:

  • ts:

Add (TimeSpan): TimeSpan .NET, .NET Standard 2.0

 

method Add(ts: TimeSpan): TimeSpan

 

TimeSpan Add(TimeSpan ts)

 

func Add(_ ts: TimeSpan) -> TimeSpan

 

Function Add(ts As TimeSpan) As TimeSpan

Parameters:

  • ts:

Days

Returns the nr of days in this timespan.

 

property Days: Int32 read;

 

Int32 Days { get; }

 

var Days: Int32 { get{} }

 

Integer Days { __get; }

 

ReadOnly Property Days() As Int32

FromDays

Create a timespan form a number of days.

 

class method FromDays(d: Double): TimeSpan

 

static TimeSpan FromDays(Double d)

 

static func FromDays(_ d: Double) -> TimeSpan

 

static TimeSpan FromDays(Double d)

 

Shared Function FromDays(d As Double) As TimeSpan

Parameters:

  • d:

FromHours

Create a timespan form a number of hours.

 

class method FromHours(d: Double): TimeSpan

 

static TimeSpan FromHours(Double d)

 

static func FromHours(_ d: Double) -> TimeSpan

 

static TimeSpan FromHours(Double d)

 

Shared Function FromHours(d As Double) As TimeSpan

Parameters:

  • d:

FromMilliseconds

Create a timespan form a number of msec.

 

class method FromMilliseconds(d: Double): TimeSpan

 

static TimeSpan FromMilliseconds(Double d)

 

static func FromMilliseconds(_ d: Double) -> TimeSpan

 

static TimeSpan FromMilliseconds(Double d)

 

Shared Function FromMilliseconds(d As Double) As TimeSpan

Parameters:

  • d:

FromMinutes

Create a timespan form a number of minutes.

 

class method FromMinutes(d: Double): TimeSpan

 

static TimeSpan FromMinutes(Double d)

 

static func FromMinutes(_ d: Double) -> TimeSpan

 

static TimeSpan FromMinutes(Double d)

 

Shared Function FromMinutes(d As Double) As TimeSpan

Parameters:

  • d:

FromSeconds

Create a timespan form a number of seconds.

 

class method FromSeconds(d: Double): TimeSpan

 

static TimeSpan FromSeconds(Double d)

 

static func FromSeconds(_ d: Double) -> TimeSpan

 

static TimeSpan FromSeconds(Double d)

 

Shared Function FromSeconds(d As Double) As TimeSpan

Parameters:

  • d:

FromTicks

Create a timespan form a number of ticks.

 

class method FromTicks(d: Int64): TimeSpan

 

static TimeSpan FromTicks(Int64 d)

 

static func FromTicks(_ d: Int64) -> TimeSpan

 

static TimeSpan FromTicks(Int64 d)

 

Shared Function FromTicks(d As Int64) As TimeSpan

Parameters:

  • d:

Hours

Returns the hours; this is always between 0 and 23.

 

property Hours: Int32 read;

 

Int32 Hours { get; }

 

var Hours: Int32 { get{} }

 

Integer Hours { __get; }

 

ReadOnly Property Hours() As Int32

Milliseconds

Returns the miliseconds; this is always between 0 and 1000.

 

property Milliseconds: Int32 read;

 

Int32 Milliseconds { get; }

 

var Milliseconds: Int32 { get{} }

 

Integer Milliseconds { __get; }

 

ReadOnly Property Milliseconds() As Int32

Minutes

Returns the minutes ; this is always between 0 and 59.

 

property Minutes: Int32 read;

 

Int32 Minutes { get; }

 

var Minutes: Int32 { get{} }

 

Integer Minutes { __get; }

 

ReadOnly Property Minutes() As Int32

Negate Cooper, Island, Toffee, ToffeeV2

Negate this timespan.

 

method Negate: TimeSpan

 

TimeSpan Negate()

 

func Negate() -> TimeSpan

 

TimeSpan Negate()

 

Function Negate() As TimeSpan

Negate .NET, .NET Standard 2.0

 

method Negate: TimeSpan

 

TimeSpan Negate()

 

func Negate() -> TimeSpan

 

Function Negate() As TimeSpan

Seconds

Returns the seconds; this is always between 0 and 59.

 

property Seconds: Int32 read;

 

Int32 Seconds { get; }

 

var Seconds: Int32 { get{} }

 

Integer Seconds { __get; }

 

ReadOnly Property Seconds() As Int32

Subtract (TimeSpan): TimeSpan Cooper, Island, Toffee, ToffeeV2

Subtract two timespans.

 

method Subtract(ts: TimeSpan): TimeSpan

 

TimeSpan Subtract(TimeSpan ts)

 

func Subtract(_ ts: TimeSpan) -> TimeSpan

 

TimeSpan Subtract(TimeSpan ts)

 

Function Subtract(ts As TimeSpan) As TimeSpan

Parameters:

  • ts:

Subtract (TimeSpan): TimeSpan .NET, .NET Standard 2.0

 

method Subtract(ts: TimeSpan): TimeSpan

 

TimeSpan Subtract(TimeSpan ts)

 

func Subtract(_ ts: TimeSpan) -> TimeSpan

 

Function Subtract(ts As TimeSpan) As TimeSpan

Parameters:

  • ts:

Ticks

Returns the ticks in this timespan.

 

property Ticks: Int64 read;

 

Int64 Ticks { get; }

 

var Ticks: Int64 { get{} }

 

Int64 Ticks { __get; }

 

ReadOnly Property Ticks() As Int64

TicksPerDay

Total ticks per day.

 

const TicksPerDay: Int64 = 864000000000;

 

const Int64 TicksPerDay = 864000000000

 

static let TicksPerDay: Int64 = 864000000000

 

static final Int64 TicksPerDay = 864000000000

 

Dim TicksPerDay As Int64 = 864000000000

TicksPerHour

Total ticks per hour.

 

const TicksPerHour: Int64 = 36000000000;

 

const Int64 TicksPerHour = 36000000000

 

static let TicksPerHour: Int64 = 36000000000

 

static final Int64 TicksPerHour = 36000000000

 

Dim TicksPerHour As Int64 = 36000000000

TicksPerMillisecond

Total ticks per msec.

 

const TicksPerMillisecond: Int64 = 10000;

 

const Int64 TicksPerMillisecond = 10000

 

static let TicksPerMillisecond: Int64 = 10000

 

static final Int64 TicksPerMillisecond = 10000

 

Dim TicksPerMillisecond As Int64 = 10000

TicksPerMinute

Total ticks per minute.

 

const TicksPerMinute: Int64 = 600000000;

 

const Int64 TicksPerMinute = 600000000

 

static let TicksPerMinute: Int64 = 600000000

 

static final Int64 TicksPerMinute = 600000000

 

Dim TicksPerMinute As Int64 = 600000000

TicksPerSecond

Total ticks per second.

 

const TicksPerSecond: Int64 = 10000000;

 

const Int64 TicksPerSecond = 10000000

 

static let TicksPerSecond: Int64 = 10000000

 

static final Int64 TicksPerSecond = 10000000

 

Dim TicksPerSecond As Int64 = 10000000

TotalDays

Returns the nr of days in this timespan.

 

property TotalDays: Double read;

 

Double TotalDays { get; }

 

var TotalDays: Double { get{} }

 

Double TotalDays { __get; }

 

ReadOnly Property TotalDays() As Double

TotalHours

Returns this timespan as total number of hours.

 

property TotalHours: Double read;

 

Double TotalHours { get; }

 

var TotalHours: Double { get{} }

 

Double TotalHours { __get; }

 

ReadOnly Property TotalHours() As Double

TotalMilliSeconds

Returns this timespan as total number of msec.

 

property TotalMilliSeconds: Double read;

 

Double TotalMilliSeconds { get; }

 

var TotalMilliSeconds: Double { get{} }

 

Double TotalMilliSeconds { __get; }

 

ReadOnly Property TotalMilliSeconds() As Double

TotalMinutes

Returns this timespan as total number of minutes.

 

property TotalMinutes: Double read;

 

Double TotalMinutes { get; }

 

var TotalMinutes: Double { get{} }

 

Double TotalMinutes { __get; }

 

ReadOnly Property TotalMinutes() As Double

TotalSeconds

Returns this timespan as total number of seconds.

 

property TotalSeconds: Double read;

 

Double TotalSeconds { get; }

 

var TotalSeconds: Double { get{} }

 

Double TotalSeconds { __get; }

 

ReadOnly Property TotalSeconds() As Double

 

TicksPerDay

Total ticks per day.

 

const TicksPerDay: Int64 = 864000000000;

 

const Int64 TicksPerDay = 864000000000

 

static let TicksPerDay: Int64 = 864000000000

 

static final Int64 TicksPerDay = 864000000000

 

Dim TicksPerDay As Int64 = 864000000000

TicksPerHour

Total ticks per hour.

 

const TicksPerHour: Int64 = 36000000000;

 

const Int64 TicksPerHour = 36000000000

 

static let TicksPerHour: Int64 = 36000000000

 

static final Int64 TicksPerHour = 36000000000

 

Dim TicksPerHour As Int64 = 36000000000

TicksPerMillisecond

Total ticks per msec.

 

const TicksPerMillisecond: Int64 = 10000;

 

const Int64 TicksPerMillisecond = 10000

 

static let TicksPerMillisecond: Int64 = 10000

 

static final Int64 TicksPerMillisecond = 10000

 

Dim TicksPerMillisecond As Int64 = 10000

TicksPerMinute

Total ticks per minute.

 

const TicksPerMinute: Int64 = 600000000;

 

const Int64 TicksPerMinute = 600000000

 

static let TicksPerMinute: Int64 = 600000000

 

static final Int64 TicksPerMinute = 600000000

 

Dim TicksPerMinute As Int64 = 600000000

TicksPerSecond

Total ticks per second.

 

const TicksPerSecond: Int64 = 10000000;

 

const Int64 TicksPerSecond = 10000000

 

static let TicksPerSecond: Int64 = 10000000

 

static final Int64 TicksPerSecond = 10000000

 

Dim TicksPerSecond As Int64 = 10000000

 

Days

Returns the nr of days in this timespan.

 

property Days: Int32 read;

 

Int32 Days { get; }

 

var Days: Int32 { get{} }

 

Integer Days { __get; }

 

ReadOnly Property Days() As Int32

Hours

Returns the hours; this is always between 0 and 23.

 

property Hours: Int32 read;

 

Int32 Hours { get; }

 

var Hours: Int32 { get{} }

 

Integer Hours { __get; }

 

ReadOnly Property Hours() As Int32

Milliseconds

Returns the miliseconds; this is always between 0 and 1000.

 

property Milliseconds: Int32 read;

 

Int32 Milliseconds { get; }

 

var Milliseconds: Int32 { get{} }

 

Integer Milliseconds { __get; }

 

ReadOnly Property Milliseconds() As Int32

Minutes

Returns the minutes ; this is always between 0 and 59.

 

property Minutes: Int32 read;

 

Int32 Minutes { get; }

 

var Minutes: Int32 { get{} }

 

Integer Minutes { __get; }

 

ReadOnly Property Minutes() As Int32

Seconds

Returns the seconds; this is always between 0 and 59.

 

property Seconds: Int32 read;

 

Int32 Seconds { get; }

 

var Seconds: Int32 { get{} }

 

Integer Seconds { __get; }

 

ReadOnly Property Seconds() As Int32

Ticks

Returns the ticks in this timespan.

 

property Ticks: Int64 read;

 

Int64 Ticks { get; }

 

var Ticks: Int64 { get{} }

 

Int64 Ticks { __get; }

 

ReadOnly Property Ticks() As Int64

TotalDays

Returns the nr of days in this timespan.

 

property TotalDays: Double read;

 

Double TotalDays { get; }

 

var TotalDays: Double { get{} }

 

Double TotalDays { __get; }

 

ReadOnly Property TotalDays() As Double

TotalHours

Returns this timespan as total number of hours.

 

property TotalHours: Double read;

 

Double TotalHours { get; }

 

var TotalHours: Double { get{} }

 

Double TotalHours { __get; }

 

ReadOnly Property TotalHours() As Double

TotalMilliSeconds

Returns this timespan as total number of msec.

 

property TotalMilliSeconds: Double read;

 

Double TotalMilliSeconds { get; }

 

var TotalMilliSeconds: Double { get{} }

 

Double TotalMilliSeconds { __get; }

 

ReadOnly Property TotalMilliSeconds() As Double

TotalMinutes

Returns this timespan as total number of minutes.

 

property TotalMinutes: Double read;

 

Double TotalMinutes { get; }

 

var TotalMinutes: Double { get{} }

 

Double TotalMinutes { __get; }

 

ReadOnly Property TotalMinutes() As Double

TotalSeconds

Returns this timespan as total number of seconds.

 

property TotalSeconds: Double read;

 

Double TotalSeconds { get; }

 

var TotalSeconds: Double { get{} }

 

Double TotalSeconds { __get; }

 

ReadOnly Property TotalSeconds() As Double

 

FromDays

Create a timespan form a number of days.

 

class method FromDays(d: Double): TimeSpan

 

static TimeSpan FromDays(Double d)

 

static func FromDays(_ d: Double) -> TimeSpan

 

static TimeSpan FromDays(Double d)

 

Shared Function FromDays(d As Double) As TimeSpan

Parameters:

  • d:

FromHours

Create a timespan form a number of hours.

 

class method FromHours(d: Double): TimeSpan

 

static TimeSpan FromHours(Double d)

 

static func FromHours(_ d: Double) -> TimeSpan

 

static TimeSpan FromHours(Double d)

 

Shared Function FromHours(d As Double) As TimeSpan

Parameters:

  • d:

FromMilliseconds

Create a timespan form a number of msec.

 

class method FromMilliseconds(d: Double): TimeSpan

 

static TimeSpan FromMilliseconds(Double d)

 

static func FromMilliseconds(_ d: Double) -> TimeSpan

 

static TimeSpan FromMilliseconds(Double d)

 

Shared Function FromMilliseconds(d As Double) As TimeSpan

Parameters:

  • d:

FromMinutes

Create a timespan form a number of minutes.

 

class method FromMinutes(d: Double): TimeSpan

 

static TimeSpan FromMinutes(Double d)

 

static func FromMinutes(_ d: Double) -> TimeSpan

 

static TimeSpan FromMinutes(Double d)

 

Shared Function FromMinutes(d As Double) As TimeSpan

Parameters:

  • d:

FromSeconds

Create a timespan form a number of seconds.

 

class method FromSeconds(d: Double): TimeSpan

 

static TimeSpan FromSeconds(Double d)

 

static func FromSeconds(_ d: Double) -> TimeSpan

 

static TimeSpan FromSeconds(Double d)

 

Shared Function FromSeconds(d As Double) As TimeSpan

Parameters:

  • d:

FromTicks

Create a timespan form a number of ticks.

 

class method FromTicks(d: Int64): TimeSpan

 

static TimeSpan FromTicks(Int64 d)

 

static func FromTicks(_ d: Int64) -> TimeSpan

 

static TimeSpan FromTicks(Int64 d)

 

Shared Function FromTicks(d As Int64) As TimeSpan

Parameters:

  • d:

 

constructor (Int64)

Creates a timespan with the given amount of ticks.

 

constructor(aTicks: Int64)

 

TimeSpan(Int64 aTicks)

 

init(_ aTicks: Int64)

 

TimeSpan(Int64 aTicks)

 

Sub New(aTicks As Int64)

Parameters:

  • aTicks:

constructor (Int32, Int32, Int32, Int32, Int32)

Creates a timespan with the given amount of days, hours, minutes, seconds, and msec.

 

constructor(d: Int32; h: Int32; m: Int32; s: Int32; ms: Int32)

 

TimeSpan(Int32 d, Int32 h, Int32 m, Int32 s, Int32 ms)

 

init(_ d: Int32, _ h: Int32, _ m: Int32, _ s: Int32, _ ms: Int32)

 

TimeSpan(Integer d, Integer h, Integer m, Integer s, Integer ms)

 

Sub New(d As Int32, h As Int32, m As Int32, s As Int32, ms As Int32)

Parameters:

  • d:
  • h:
  • m:
  • s:
  • ms:

constructor (Int32, Int32, Int32)

Creates a timespan with the given amount of hours, minutes, seconds.

 

constructor(h: Int32; m: Int32; s: Int32)

 

TimeSpan(Int32 h, Int32 m, Int32 s)

 

init(_ h: Int32, _ m: Int32, _ s: Int32)

 

TimeSpan(Integer h, Integer m, Integer s)

 

Sub New(h As Int32, m As Int32, s As Int32)

Parameters:

  • h:
  • m:
  • s:

Add (TimeSpan): TimeSpan Cooper, Island, Toffee, ToffeeV2

Add two timespans together, returning the new span.

 

method Add(ts: TimeSpan): TimeSpan

 

TimeSpan Add(TimeSpan ts)

 

func Add(_ ts: TimeSpan) -> TimeSpan

 

TimeSpan Add(TimeSpan ts)

 

Function Add(ts As TimeSpan) As TimeSpan

Parameters:

  • ts:

Negate Cooper, Island, Toffee, ToffeeV2

Negate this timespan.

 

method Negate: TimeSpan

 

TimeSpan Negate()

 

func Negate() -> TimeSpan

 

TimeSpan Negate()

 

Function Negate() As TimeSpan

Subtract (TimeSpan): TimeSpan Cooper, Island, Toffee, ToffeeV2

Subtract two timespans.

 

method Subtract(ts: TimeSpan): TimeSpan

 

TimeSpan Subtract(TimeSpan ts)

 

func Subtract(_ ts: TimeSpan) -> TimeSpan

 

TimeSpan Subtract(TimeSpan ts)

 

Function Subtract(ts As TimeSpan) As TimeSpan

Parameters:

  • ts:

Add (TimeSpan): TimeSpan .NET, .NET Standard 2.0

 

method Add(ts: TimeSpan): TimeSpan

 

TimeSpan Add(TimeSpan ts)

 

func Add(_ ts: TimeSpan) -> TimeSpan

 

Function Add(ts As TimeSpan) As TimeSpan

Parameters:

  • ts:

Negate .NET, .NET Standard 2.0

 

method Negate: TimeSpan

 

TimeSpan Negate()

 

func Negate() -> TimeSpan

 

Function Negate() As TimeSpan

Subtract (TimeSpan): TimeSpan .NET, .NET Standard 2.0

 

method Subtract(ts: TimeSpan): TimeSpan

 

TimeSpan Subtract(TimeSpan ts)

 

func Subtract(_ ts: TimeSpan) -> TimeSpan

 

Function Subtract(ts As TimeSpan) As TimeSpan

Parameters:

  • ts: