📄 datetime.h
字号:
/*
*
* Copyright (C) 2003 Xiangbin Lee <honeycombs@sina.com> <honeycombs@263.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation.
*/
#ifndef __DATEMYTIME_H
#define __DATEMYTIME_H
typedef struct _DT_DATE_TIME
{
unsigned short year;
unsigned char month;
unsigned char day;
unsigned char hour;
unsigned char minute;
unsigned char second;
}DT_DATE_TIME;
void DT_CopyDateTime(DT_DATE_TIME *thisdat, DT_DATE_TIME nextdat);
////////////////////////////////////////
// check day
unsigned char DT_GetMaxDay(unsigned short year, unsigned char month);
unsigned char DT_CheckDateTime(DT_DATE_TIME thisdat);
unsigned char DT_GetNextDay(DT_DATE_TIME *nextdat,DT_DATE_TIME thisdat);
unsigned char DT_GetLastDay(DT_DATE_TIME *nextdat, DT_DATE_TIME thisdat);
unsigned short DT_NextYear(DT_DATE_TIME *nowDateTime);
unsigned char DT_NextMonth(DT_DATE_TIME *nowDateTime);
unsigned char DT_NextDay(DT_DATE_TIME *nowDateTime);
unsigned char DT_NextHour(DT_DATE_TIME *nowDateTime);
unsigned char DT_NextMinute(DT_DATE_TIME *nowDateTime);
unsigned char DT_NextSecond(DT_DATE_TIME *nowDateTime);
unsigned short DT_LastYear(DT_DATE_TIME *nowDateTime);
unsigned char DT_LastMonth(DT_DATE_TIME *nowDateTime);
unsigned char DT_LastDay(DT_DATE_TIME *nowDateTime);
unsigned char DT_LastHour(DT_DATE_TIME *nowDateTime);
unsigned char DT_LastMinute(DT_DATE_TIME *nowDateTime);
unsigned char DT_LastSecond(DT_DATE_TIME *nowDateTime);
void DT_MaxDateTime(DT_DATE_TIME *nowDateTime, DT_DATE_TIME maxDateTimer);
void DT_MinDateTime(DT_DATE_TIME *nowDateTime, DT_DATE_TIME minDateTimer);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -