EBookContacts.ContactDate

Fields

Name

Type

Access

Description

day

int

r/w

month

int

r/w

year

int

r/w

Methods

class

from_string (str)

class

new ()

equal (dt2)

free ()

to_string ()

Details

class EBookContacts.ContactDate
classmethod from_string(str)
Parameters:

str (str) – a date string in the format YYYY-MM-DD or YYYYMMDD

Returns:

A new EBookContacts.ContactDate struct.

Return type:

EBookContacts.ContactDate

Creates a new EBookContacts.ContactDate based on str.

classmethod new()
Returns:

A new EBookContacts.ContactDate struct.

Return type:

EBookContacts.ContactDate

Creates a new EBookContacts.ContactDate struct.

equal(dt2)
Parameters:

dt2 (EBookContacts.ContactDate) – an EBookContacts.ContactDate

Returns:

True if self and dt2 are equal, False otherwise.

Return type:

bool

Checks if self and dt2 are the same date.

free()

Frees the self struct and its contents.

to_string()
Returns:

A date string, owned by the caller.

Return type:

str

Generates a date string in the format YYYY-MM-DD based on the values of self.