Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions
calIDateTimeFormatter Interface Reference

import "calIDateTimeFormatter.idl";

Inheritance diagram for calIDateTimeFormatter:
Inheritance graph
[legend]
Collaboration diagram for calIDateTimeFormatter:
Collaboration graph
[legend]

List of all members.

Public Member Functions

AString formatDate (in calIDateTime aDate)
 Format a date in either short or long format, depending on the users preference.
AString formatDateShort (in calIDateTime aDate)
 Format a date into a short format, for example "12/17/2005".
AString formatDateLong (in calIDateTime aDate)
 Format a date into a long format, for example "Sat Dec 17 2005".
AString formatDateWithoutYear (in calIDateTime aDate)
 Format a date into a short format without mentioning the year, for example "Dec 17".
AString formatTime (in calIDateTime aDate)
 Format a time into the format specified by the OS settings.
AString formatDateTime (in calIDateTime aDate)
 Format a datetime into the format specified by the OS settings.
AUTF8String formatItemInterval (in calIItemBase aItem)
 Format a time interval that is defined by an item with the default timezone Internally it calls "formatInterval" after retrieving the start/entry and end/due date of the item.
AUTF8String formatInterval (in calIDateTime aStartDate, in calIDateTime aEndDate)
 Format a time interval.
AString monthName (in unsigned long aMonthIndex)
 Get the month name.
AString shortMonthName (in unsigned long aMonthIndex)
 Get the abbrevation of the month name.
AString dayName (in unsigned long aDayIndex)
 Get the day name.
AString shortDayName (in unsigned long aDayIndex)
 Get the abbrevation of the day name.

Detailed Description

Definition at line 44 of file calIDateTimeFormatter.idl.


Member Function Documentation

AString calIDateTimeFormatter::dayName ( in unsigned long  aDayIndex)

Get the day name.

Parameters:
aMonthIndexzero-based month number (0 is sunday, 6 is saturday)
Returns:
the day name in the current locale

Format a date in either short or long format, depending on the users preference.

See also:
formatDateShort formatDateLong

Format a date into a long format, for example "Sat Dec 17 2005".

Parameters:
aDatethe datetime to format
Returns:
a string representing the date part of the datetime

Format a date into a short format, for example "12/17/2005".

Parameters:
aDatethe datetime to format
Returns:
a string representing the date part of the datetime

Format a datetime into the format specified by the OS settings.

Will omit the seconds from the output.

Parameters:
aDateTimethe datetime to format
Returns:
a string representing the datetime

Format a date into a short format without mentioning the year, for example "Dec 17".

Parameters:
aDatethe datetime to format
Returns:
a string representing the date part of the datetime
AUTF8String calIDateTimeFormatter::formatInterval ( in calIDateTime  aStartDate,
in calIDateTime  aEndDate 
)

Format a time interval.

The returned string may assume that the dates are so close to each other, that it can leave out some parts of the part string denoting the end date

Parameters:
aStartDateThe start of the interval
aEndDateThe end of the interval
Returns:
A String describing the interval in a legible form

Format a time interval that is defined by an item with the default timezone Internally it calls "formatInterval" after retrieving the start/entry and end/due date of the item.

Parameters:
aItemThe item describing the interval

Format a time into the format specified by the OS settings.

Will omit the seconds from the output.

Parameters:
aDatethe datetime to format
Returns:
a string representing the time part of the datetime
AString calIDateTimeFormatter::monthName ( in unsigned long  aMonthIndex)

Get the month name.

Parameters:
aMonthIndexzero-based month number (0 is january, 11 is december)
Returns:
the month name in the current locale
AString calIDateTimeFormatter::shortDayName ( in unsigned long  aDayIndex)

Get the abbrevation of the day name.

See also:
dayName
AString calIDateTimeFormatter::shortMonthName ( in unsigned long  aMonthIndex)

Get the abbrevation of the month name.

See also:
monthName

The documentation for this interface was generated from the following file: