MorePalmOS
A development library for developing Palm OS applications

MoreDateTime.c File Reference

#include "MorePrefix.h"
#include "MoreDateTime.h"
#include "MorePrivate.h"
#include <ErrorMgr.h>

Include dependency graph for MoreDateTime.c:

Include dependency graph

Go to the source code of this file.


Functions

void MTimeDateTimeToDate (const DateTimeType *dateTime, DateType *date)
 Assigns the value of a DateType to a DateTimeType.
void MTimeYMDtoDateType (DateType *date, UInt16 year, UInt16 month, UInt16 day)
 Assigns a year/month/day to a DateType.
void MTimeDateTypeToYMD (const DateType *date, UInt16 *year, UInt16 *month, UInt16 *day)
 Assigns a DateType to a year/month/day.

Function Documentation

void MTimeDateTimeToDate const DateTimeType *  dateTime,
DateType *  date
 

Assigns the value of a DateType to a DateTimeType.

Definition at line 25 of file MoreDateTime.c.

00026 {
00027         _check( dateTime && date );
00028         date->day = dateTime->day;
00029         date->month = dateTime->month;
00030         date->year = dateTime->year - firstYear;
00031 }

void MTimeDateTypeToYMD const DateType *  date,
UInt16 *  year,
UInt16 *  month,
UInt16 *  day
 

Assigns a DateType to a year/month/day.

Year returned is four digit.

Definition at line 46 of file MoreDateTime.c.

00048 {
00049         _check( date );
00050         if ( year )
00051                 *year = date->year + firstYear;
00052         if ( month )
00053                 *month = date->month;
00054         if ( day )
00055                 *day = date->day;
00056 }

void MTimeYMDtoDateType DateType *  date,
UInt16  year,
UInt16  month,
UInt16  day
 

Assigns a year/month/day to a DateType.

Year must be four digit.

Definition at line 35 of file MoreDateTime.c.

00037 {
00038         _check( date );
00039         date->day = day;
00040         date->month = month;
00041         date->year = year - firstYear;
00042 }

SourceForge.net Logo