Contact​Date Contact​Date Contact​Date Class

Definition

Represents an important date for a contact.

public : sealed class ContactDate : IContactDatepublic sealed class ContactDate : IContactDatePublic NotInheritable Class ContactDate Implements IContactDate
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Here is how to use the ContactDate properties to format date strings.

Insert sentinel values

  1. Construct a Windows.Globalization.Calendar.
  2. If year has a value, set year to that value, else set year to 2004 (a leap year so every day is valid).
  3. If month has a value, set month to that value, else set month to 1 (a month with every day valid).
  4. if day has a value, set day to that value (day will be set to some value automatically and we don't really care what it is so no need to explicitly set it).
  5. Get the Windows.Foundation.DateTime from the Calendar.

Build up a template to format

  1. If year has a value, append "year " to the template.
  2. If month has a value, append "month " to the template.
  3. If day has a value, append "day " to the template.
  4. Construct a Windows.Globalization.DateTimeFormatting.DateTimeFormatter with the template.
  5. Format by using the date time formatter and the Windows.Foundation.DateTime retrieved from the Calendar.

Constructors

ContactDate() ContactDate() ContactDate()

Initializes a new instance of a ContactDate class.

public : ContactDate()public ContactDate()Public Sub New()
Attributes

Properties

Day Day Day

Gets and sets the day for an important date for a contact.

public : IReference<uint> Day { get; set; }public Nullable<uint> Day { get; set; }Public ReadWrite Property Day As Nullable<uint>
Value
IReference<unsigned short> Nullable<uint> Nullable<uint>

The day for an important date for a contact.

Attributes

Description Description Description

Gets and sets the description for an important date for a contact. The maximum string length for the description is 512 characters.

public : PlatForm::String Description { get; set; }public string Description { get; set; }Public ReadWrite Property Description As string
Value
PlatForm::String string string

The description for an important date for a contact.

Attributes

Kind Kind Kind

Gets and sets the kind of important date for a contact.

public : ContactDateKind Kind { get; set; }public ContactDateKind Kind { get; set; }Public ReadWrite Property Kind As ContactDateKind
Value
ContactDateKind ContactDateKind ContactDateKind

A ContactDateKind -typed value that indicates the type of important date for a contact.

Attributes

Month Month Month

Gets and sets the month for an important date for a contact.

public : IReference<uint> Month { get; set; }public Nullable<uint> Month { get; set; }Public ReadWrite Property Month As Nullable<uint>
Value
IReference<unsigned short> Nullable<uint> Nullable<uint>

The month for an important date for a contact.

Attributes

Year Year Year

Gets and sets the year for an important date for a contact. This value must be convertible to a FILETIME structure.

public : IReference<int> Year { get; set; }public Nullable<int> Year { get; set; }Public ReadWrite Property Year As Nullable<int>
Value
IReference<int> Nullable<int> Nullable<int>

The year for an important date for a contact.

Attributes