mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 11:58:10 +08:00
日期快捷键支持上月底
This commit is contained in:
parent
007242b64e
commit
e0fdf7a217
@ -255,6 +255,7 @@ order: 13
|
||||
- `tomorrow`: 明天
|
||||
- `endofthisweek`: 本周日
|
||||
- `endofthismonth`:本月底
|
||||
- `endoflastmonth`:上月底
|
||||
- `{n}daysago` : n 天前,例如:`1daysago`,下面用法相同
|
||||
- `{n}dayslater`: n 天后
|
||||
- `{n}weeksago`: n 周前
|
||||
|
@ -91,6 +91,13 @@ const availableShortcuts: {[propName: string]: any} = {
|
||||
date: (now: moment.Moment) => {
|
||||
return now.endOf('month');
|
||||
}
|
||||
},
|
||||
|
||||
endoflastmonth: {
|
||||
label: 'Date.endOfLastMonth',
|
||||
date: (now: moment.Moment) => {
|
||||
return now.add(-1, 'month').endOf('month');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -34,6 +34,7 @@ register('en-US', {
|
||||
'Date.daysago': '{{days}} day(s) ago',
|
||||
'Date.dayslater': '{{days}} day(s) later',
|
||||
'Date.endOfMonth': 'last day of the month',
|
||||
'Date.endOfLastMonth': 'last day of last month',
|
||||
'Date.endOfWeek': 'Saturday',
|
||||
'Date.hoursago': '{{hours}} hour(s) ago',
|
||||
'Date.hourslater': '{{hours}} hour(s) later',
|
||||
|
@ -35,6 +35,7 @@ register('zh-CN', {
|
||||
'Date.dayslater': '{{days}}天后',
|
||||
'Date.endOfMonth': '本月最后一天',
|
||||
'Date.endOfWeek': '周日',
|
||||
'Date.endOfLastMonth': '上月最后一天',
|
||||
'Date.hoursago': '{{hours}}小时前',
|
||||
'Date.hourslater': '{{hours}}小时后',
|
||||
'Date.invalid': '日期无效',
|
||||
|
Loading…
Reference in New Issue
Block a user