date.h

来自「Oracle OCI 应用」· C头文件 代码 · 共 54 行

H
54
字号

/**
 * Date.h
 * 封装数据库的日期类型
 *
 * @author aizy
 * @date 2005-3-30
 */

#ifndef _DB_DATE_SET_H_
#define _DB_DATE_SET_H_

#include "datetime_Date.h"

namespace db {

class Date : public util::Date  
{
public:
	/**
	 * 缺省构造函数
	 */
	Date();

	/**
	 * 构造Date对象
	 *
	 * @param  timeMillis  从格林尼治标准时间1970年1月1号 00:00:00至今的毫秒数
	 * @see    GetCurrentTimeMillis()
	 */
	explicit Date(util::int64 timeMillis);

	/**
	 * 构造Date对象,并以当前时区初始化Date对象
	 *
	 * @param   year    the year between 1970–2038.
	 * @param   month   the month between 1-12.
	 * @param   date    the day of the month between 1-31.
	 */
	Date(int year, int month, int date);

	virtual ~Date();

public:
	/**
	 * 转换成yyyy-MM-dd HH:mm:ss 格式的字符串
	 */
	virtual std::string ToString() const;
};

}

#endif // _DB_DATE_SET_H_

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?