⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 20f9850e1626001d19b3d5b2cbdf6b4e

📁 实训时做的物流系统
💻
字号:
package com.lib.biz;

import java.text.SimpleDateFormat;
import java.util.Date;
import com.lib.cls.InDate;
import com.lib.cls.PrintDate;

public class SetDate {
	private static SetDate instance;
	public static SetDate getInstance(){
		if (instance==null){
			 instance = new SetDate();
		}
		return instance;		
	}

public Date SetPrintDate(PrintDate prD){
	Date date = new Date();
	if(prD==null){
		return  date = null;
	}else{
		try {
			date = new SimpleDateFormat("yyyy-MM-dd").parse(prD.getYear()+"-"+prD.getMonth()+"-"+prD.getDay());
		} catch (Exception e) {
			System.out.println("出版日期格式错误");
		}
		return date;
	}
}
public Date SetInDate(InDate inD){
	Date date = new Date();
	try {
		date = new SimpleDateFormat("yyyy-MM-dd").parse(inD.getYear()+"-"+inD.getMonth()+"-"+inD.getDay());
	} catch (Exception e) {
		System.out.println("入库日期格式错误");
	}
	return date;
}

//public static void main(String[] args) {
//	PrintDate prid = new PrintDate();
//	prid.setDay("12");
//	prid.setMonth("02");
//	prid.setYear("2002");
//	Date date = SetPrintDate(prid)
//}
}

⌨️ 快捷键说明

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