• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class ICalDuration

An iCalendar duration value (RFC 5545 §3.3.6, ISO 8601 duration). For example, P1DT2H30M represents 1 day, 2 hours, and 30 minutes.

Inheritance
object
ICalDuration
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: DRIT.Mail.Rfc.ICal
Assembly: DRIT.Mail.dll
Syntax
public sealed class ICalDuration

Constructors

View Source

ICalDuration(TimeSpan)

Initializes a new instance of the ICalDuration class.

Declaration
public ICalDuration(TimeSpan value)
Parameters
Type Name Description
TimeSpan value

The duration as a TimeSpan.

Properties

View Source

IsNegative

Gets a value indicating whether the duration is negative.

Declaration
public bool IsNegative { get; }
Property Value
Type Description
bool
View Source

Value

Gets the duration as a TimeSpan.

Declaration
public TimeSpan Value { get; }
Property Value
Type Description
TimeSpan

Methods

View Source

Parse(string)

Parses an iCalendar duration string (RFC 5545 §3.3.6). Supports formats such as P1D, P1W, PT1H30M, P1DT2H30M, -P1D.

Declaration
public static ICalDuration Parse(string text)
Parameters
Type Name Description
string text

Specifies the text value.

Returns
Type Description
ICalDuration
View Source

ToString()

Formats this duration for iCalendar serialization (e.g. P1DT2H30M).

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
object.ToString()
  • View Source
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX