类 GetDateMethod
java.lang.Object
com.publiccms.common.base.BaseMethod
com.publiccms.views.method.tools.GetDateMethod
- 所有已实现的接口:
 freemarker.template.TemplateMethodModel,freemarker.template.TemplateMethodModelEx,freemarker.template.TemplateModel
getDate 获取特定日期
 
参数列表
- 日期类型【yesterday:昨天,tomorrow:明天,thisSunday:本周日,thisMonday:本周一,lastMonday:上周一,lastSunday:上周日,lastWeek:上一周,lastMonth:上个月,lastSeason:上季度,lastHalfYear:半年前,lastYear:去年,nextMonday:下周一,nextSunday:下周日,nextWeek:下一周,nextMonth:下个月,nextSeason:下季度,nextHalfYear:半年后,nextYear:明年】,默认当前时间
 - 日期,【2020-01-01 23:59:59】,【2020-01-01】,为空则取当前日期
 
返回结果
date:日期
${getDate('thisSunday','2020-01-01')}
<script>
$.getJSON('${site.dynamicPath}api/method/getDate?parameters=thisSunday¶meters=2020-01-01', function(data){
console.log(data);
});
</script>
 - 
字段概要
从类继承的字段 com.publiccms.common.base.BaseMethod
log从接口继承的字段 freemarker.template.TemplateModel
NOTHING - 
构造器概要
构造器 - 
方法概要
从类继承的方法 com.publiccms.common.base.BaseMethod
exec, execute, getBoolean, getDate, getDouble, getInteger, getIntegerArray, getLong, getLongArray, getMap, getModel, getName, getShort, getString, getStringArray, httpEnabled, setName 
- 
构造器详细资料
- 
GetDateMethod
public GetDateMethod() 
 - 
 - 
方法详细资料
- 
execute
public Object execute(List<freemarker.template.TemplateModel> arguments) throws freemarker.template.TemplateModelException - 指定者:
 execute在类中BaseMethod- 抛出:
 freemarker.template.TemplateModelException
 - 
needAppToken
public boolean needAppToken()- 指定者:
 needAppToken在类中BaseMethod- 返回:
 - whether to need app token
 
 - 
minParametersNumber
public int minParametersNumber()- 指定者:
 minParametersNumber在类中BaseMethod- 返回:
 - min parameters number
 
 - 
getMonday
 - 
getSunday
 
 -