![](https://pdfstore-manualsonline.prod.a.ki/pdfasset/4/44/44414c02-d064-4424-ae12-8acc58561d02/44414c02-d064-4424-ae12-8acc58561d02-bg7e.png)
iVIEW-100 Series user’s Manual, 2006, v2.0 ----- 126
Func.: Read the system date from the RTC
Syntax:
void GetDate(int *year,int *month,int *day);
Header: #include ”iVIEW.h”
Description:
year: 2000-2080
month: 1-12
day: 1-31
Example: Please refer to “GetTime()” for detail information.
SetDate()
Func.: Set the system date to the RTC
Syntax:
int SetDate(int year,int month,int day);
Header: #include ”iVIEW.h”
Description:
year: 2000-2080
month: 1-12
day: 1-31
Return Value: On success return NoError. On fail return DateError(-18).
Example: Please refer to “GetTime()” for detail information.
GetWeekDay()
Func.: Read the weekday from the RTC.
Syntax:
int GetWeekDay(void);
Header: #include ”iVIEW.h”
Description:
Return Value: 0=>Sunday, 1-6=>Monday to Saturday.
Note: GetWeekDay() does not check the weekday is right or not, just read
from RTC. When use MiniOS7 command "date" to set date, MiniOS7 will
calculate the right weekday and set to RTC. If user call SetDate(), it also will
calculate the right weekday and set to RTC. But if user call SetWeekDay( )
need to calculate the right weekday himself.
Example: Please refer to “GetTime()” for detail information.