?OJ???????????

ACSolo  发布于1年前 448 阅读 评论(3)

?????????????????????????????????????????????????

OJ????????

public String getFriendlyDate(Date time){
	if(time == null) return getText("unknown");
	int ct = (int)((System.currentTimeMillis() - time.getTime())/1000);
	if(ct < 3600)
		return Math.max(ct / 60,1) +getText("minutes_before");
	if(ct >= 3600 && ct < 86400)
		return ct / 3600 +getText("hours_before");
	if(ct >= 86400 && ct < 2592000){ //86400 * 30
		int day = ct / 86400 ;	
		if(day>1){
			return day +getText("days_before");	
		}
		return getText("yesterday");			
	}
	if(ct >= 2592000 && ct < 31104000) //86400 * 30
		return ct / 2592000 +getText("months_before");
	return ct / 31104000 + getText("years_before");
}

 
 
 
 
Vote: I like it 0 Vote: I do not like it

 
 
 
 
  • 123456 发布于 2017-06-03 19:34:27 Vote: I like it   0   Vote: I do not like it

    谁能帮帮我,部署了项目但是judge.exe每次运行直接闪退怎么办啊???谢谢谢谢谢谢

    • ACSolo 发布于 11个月前 Vote: I like it   0   Vote: I do not like it

      看下D:\OJ\log目录下的日志,看下异常退出原因

    • ACSolo 发布于 11个月前 Vote: I like it   0   Vote: I do not like it

      Bug已修复:https://git.oschina.net/jungle/online-judge/commit/fcbe5669aacfeb7a7d0da780f294a6963aa3bc2a


Reply: Reply it before Login