gdate.h
来自「一个由Mike Gashler完成的机器学习方面的includes neural」· C头文件 代码 · 共 56 行
H
56 行
/* Copyright (C) 2006, Mike Gashler This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. see http://www.gnu.org/copyleft/lesser.html*/#ifndef __GDATE_H__#define __GDATE_H__typedef unsigned int GDate;#define INVALID_DATE (GDate)-1;inline int GetYear(GDate date){ return ((int)(date >> 16)) - 0x8000;}inline int GetMonth(GDate date){ return (int)((date >> 8) & 0xff);}inline int GetDay(GDate date){ return (int)(date & 0xff);}inline GDate MakeDate(int year, int month, int day){ return (GDate)(((year + 0x8000) << 16) | (month << 8) | day);}inline int CompareDates(GDate d1, GDate d2){ if(d1 < d2) return -1; else if(d2 < d1) return 1; return 0;}GDate ParseDate(const char* szString);GDate ParseDate(const wchar_t* wszString);#ifndef NO_TEST_CODEvoid TestGDate();#endif // !NO_TEST_CODE#endif // __GDATE_H__
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?