//日期时间函数--41个 export const DateTimeFunc = [ { "key": "DateTimeAddDays", "name": "增加指定天数", "params": [ { "key": "date", "name": "日期时间", "type": "string" }, { "key": "value", "name": "增加天数", "type": "int" } ], "description": `【功能】:在指定日期时间上增加指定天数\n【返回值类型】:日期时间(DateTime)\n【示例】:增加指定天数("2019-01-30T10:00:00+08:00",2)【返回值】:2019-02-01T10:00+08:00`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "DateTimeAddYears", "name": "增加指定年数", "params": [ { "key": "date", "name": "日期时间", "type": "string" }, { "key": "value", "name": "增加年数", "type": "int" } ], "description": `【功能】:在指定日期时间上增加指定年数\n【返回值类型】:日期时间(DateTime)\n【示例】:增加指定年数("2019-01-30T10:00:00+08:00",2)【返回值】:2021-01-30T10:00+08:00`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "DateTimeAddMonths", "name": "增加指定月数", "params": [ { "key": "date", "name": "日期时间", "type": "string" }, { "key": "value", "name": "增加月数", "type": "int" } ], "description": `【功能】:在指定日期时间上增加指定的月数\n【返回值类型】:日期时间(DateTime)\n【示例】:增加指定月数("2019-01-30T10:00:00+08:00",1)【返回值】:2019-02-28T10:00+08:00`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "GetFirstDayOfMonth", "name": "获取日期时间所在月第一天", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:获取指定日期时间所在月的第一天的日期\n【返回值类型】:日期时间(DateTime)\n【示例】:获取日期时间所在月第一天("2019-01-30T10:00:00+08:00")【返回值】:2019-01-01T10:00+08:00`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "GetLastDayOfMonth", "name": "获取日期时间所在月最后一天", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:获取指定日期时间所在月的最后一天的日期\n【返回值类型】:日期时间(DateTime)\n【示例】:获取日期时间所在月最后一天("2019-01-30T10:00:00+08:00")【返回值】:2019-01-31T10:00+08:00`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "GetDateTimeNow", "name": "获取当前日期时间", "params": [], "description": `【功能】:获取当前的日期时间\n【返回值类型】:日期时间(DateTime)\n【示例】:获取当前日期时间()【返回值】:2019-01-30T12:00:00.000+08:00`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "CompareDate", "name": "比较两个时间", "params": [ { "key": "date1", "name": "日期时间一", "type": "string" }, { "key": "date2", "name": "日期时间二", "type": "string" } ], "description": `【功能】:比较两个时间值,并返回一个整数\n【返回值类型】:数值(int32)日期1早于日期2,返回-1;日期1等于日期2,返回0;日期1晚于日期2,返回1\n【示例】:比较两个时间("2019-01-30T10:00:00+08:00","2019-02-01T10:00:00+08:00")【返回值】:-1`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "FormatDate", "name": "格式化当前日期", "params": [ { "key": "format", "name": "格式", "type": "string" } ], "description": `【功能】:使用指定的格式将当前日期时间值转换为其等效的字符串表示形式\n【返回值类型】:字符串(String)\n【示例】:格式化当前日期("yyyy-MM-dd HH:mm:ss")【返回值】:"2019-01-30 01:00:00"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "FormatDefineDate", "name": "格式化指定日期", "params": [ { "key": "format", "name": "格式", "type": "string" }, { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:使用指定的格式将指定的日期时间值转换为其等效的字符串表示形式\n【返回值类型】:字符串(String)\n【示例】:格式化指定日期("yyyy-MM-dd HH:mm:ss","2019-01-30 01:00:00")【返回值】:"2019-01-30 01:00:00"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "Today", "name": "今天", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定日期的今天,格式为"yyyy-MM-dd"形式,无参数则默认返回当前日期的今天\n【返回值类型】:字符串(String)\n【示例】:今天("2019-01-30T10:00:00+08:00")【返回值】:"2019-01-30"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "Yesterday", "name": "昨天", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定日期的昨天,格式为"yyyy-MM-dd"形式,无参数则默认返回当前日期的昨天\n【返回值类型】:字符串(String)\n【示例】:昨天("2019-01-30T10:00:00+08:00")【返回值】:"2019-01-29"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "Tomorrow", "name": "明天", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定日期的明天,格式为"yyyy-MM-dd"形式,无参数则默认返回当前日期的明天\n【返回值类型】:字符串(String)\n【示例】:明天("2019-01-30T10:00:00+08:00")【返回值】:"2019-01-31"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "ThisYear", "name": "本年", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定日期的本年,格式为"yyyy"形式,无参数则默认返回当前日期的本年\n【返回值类型】:字符串(String)\n【示例】:本年("2019-01-30T10:00:00+08:00")【返回值】:"2019"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "LastYear", "name": "去年", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定日期的去年,格式为"yyyy"形式,无参数则默认返回当前日期的去年\n【返回值类型】:字符串(String)\n【示例】:去年("2019-01-30T10:00:00+08:00")【返回值】:"2018"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "NextYear", "name": "明年", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定日期的明年,格式为"yyyy"形式,无参数则默认返回当前日期的明年\n【返回值类型】:字符串(String)\n【示例】:明年("2019-01-30T01:00:00+08:00")【返回值】:"2020"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "ThisMonth", "name": "本月", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定日期的本月,格式为"MM"形式,无参数则默认返回当前日期的本月\n【返回值类型】:字符串(String)\n【示例】:本月("2019-01-30T01:00:00+08:00")【返回值】:"1"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "LastMonth", "name": "上月", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定日期的上月,格式为"MM"形式,无参数则默认返回当前日期的上月\n【返回值类型】:字符串(String)\n【示例】:上月("2019-02-30 01:00:00")【返回值】:"1"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "NextMonth", "name": "下月", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定日期的下月,格式为"MM"形式,无参数则默认返回当前日期的下月\n【返回值类型】:字符串(String)\n【示例】:下月("2019-01-30T01:00:00+08:00")【返回值】:"2"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "ThisWeek", "name": "本周", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定日期在本年的第几周,格式为"ww"形式,无参数则默认返回当前日期在本年的第几周\n【返回值类型】:字符串(String)\n【示例】:本周("2019-01-30T01:00:00+08:00")【返回值】:"5"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "LastWeek", "name": "上周", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定日期的上周,格式为"ww"形式,无参数则默认返回当前日期的上周\n【返回值类型】:字符串(String)\n【示例】:上周("2019-01-30T01:00:00+08:00")【返回值】:"4"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "NextWeek", "name": "下周", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定日期的下周,格式为"ww"形式,无参数则默认返回当前日期的下周\n【返回值类型】:字符串(String)\n【示例】:下周("2019-01-30T01:00:00+08:00")【返回值】:"6"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "DayOfWeek", "name": "星期几", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定日期是本周的星期几,格式为"n",无参数则默认返回当前日期是本周的星期几\n【返回值类型】:字符串(String)\n【示例】:星期几("2019-01-30T01:00:00+08:00")【返回值】:"3"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "FirstDayOfWeek", "name": "本周第一天", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定日期的本周第一天,格式为"yyyy-MM-dd",无参数则默认返回当前日期的本周第一天\n【返回值类型】:字符串(String)\n【示例】:本周第一天("2019-01-30T01:00:00+08:00")【返回值】:"2019-01-28"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "LastDayOfWeek", "name": "本周最后一天", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定日期的本周最后一天,格式为"yyyy-MM-dd",无参数则默认返回当前日期的本周第一天\n【返回值类型】:字符串(String)\n【示例】:本周最后一天("2019-01-30T01:00:00+08:00")【返回值】:"2019-02-03"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "FirstDayOfLastWeek", "name": "上周第一天", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定日期的上周第一天,格式为"yyyy-MM-dd",无参数则默认返回当前日期的上周第一天\n【返回值类型】:字符串(String)\n【示例】:上周第一天("2019-01-30T01:00:00+08:00")【返回值】:"2019-01-21"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "LastDayOfLastWeek", "name": "上周最后一天", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定日期的上周最后一天,格式为"yyyy-MM-dd",无参数则默认返回当前日期的上周最后一天\n【返回值类型】:字符串(System.String)\n【示例】:上周最后一天("2019-01-30T01:00:00+08:00")【返回值】:"2019-01-27"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "FirstDayOfNextWeek", "name": "下周第一天", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定日期的下周第一天,格式为"yyyy-MM-dd",无参数则默认返回当前日期的下周第一天\n【返回值类型】:字符串(String)\n【示例】:下周第一天("2019-01-30T01:00:00+08:00")【返回值】:"2019-02-04"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "LastDayOfNextWeek", "name": "下周最后一天", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定日期的下周最后一天,格式为"yyyy-MM-dd",无参数则默认返回当前日期的下周最后一天\n【返回值类型】:字符串(String)\n【示例】:下周最后一天("2019-01-30T01:00:00+08:00")【返回值】:"2019-02-10"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "FirstDayOfMonth", "name": "本月第一天", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定日期的本月第一天,格式为"yyyy-MM-dd",无参数则默认返回当前日期的本月第一天\n【返回值类型】:字符串(String)\n【示例】:本月第一天("2019-01-30T01:00:00+08:00")【返回值】:"2019-01-01"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "LastDayOfMonth", "name": "本月最后一天", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定日期的本月最后一天,格式为"yyyy-MM-dd",无参数则默认返回当前日期的本月最后一天\n【返回值类型】:字符串(String)\n【示例】:本月最后一天("2019-01-30T01:00:00+08:00")【返回值】:"2019-01-31"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "FirstDayOfLastMonth", "name": "上月第一天", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定日期的上月第一天,格式为"yyyy-MM-dd",无参数则默认返回当前日期的上月第一天\n【返回值类型】:字符串(String)\n【示例】:上月第一天("2019-01-30T01:00:00+08:00")【返回值】:"2018-12-01"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "LastDayOfLastMonth", "name": "上月最后一天", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定日期的上月最后一天,格式为"yyyy-MM-dd",无参数则默认返回当前日期的上月最后一天\n【返回值类型】:字符串(String)\n【示例】:上月最后一天("2019-01-30T01:00:00+08:00")【返回值】:"2018-12-31"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "FirstDayOfNextMonth", "name": "下月第一天", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定日期的下月第一天,格式为"yyyy-MM-dd",无参数则默认返回当前日期的下月第一天\n【返回值类型】:字符串(String)\n【示例】:下月第一天("2019-01-30T01:00:00+08:00")【返回值】:"2019-02-01"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "LastDayOfNextMonth", "name": "下月最后一天", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定日期的下月最后一天,格式为"yyyy-MM-dd",无参数则默认返回当前日期的下月最后一天\n【返回值类型】:字符串(String)\n【示例】:下月最后一天("2019-01-30T01:00:00+08:00")【返回值】:"2019-02-28"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "FirstDayOfYear", "name": "本年第一天", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定日期的本年第一天,格式为"yyyy-MM-dd",无参数则默认返回当前日期的本年第一天\n【返回值类型】:字符串(String)\n【示例】:本年第一天("2019-01-30T01:00:00+08:00")【返回值】:"2019-01-01"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "LastDayOfYear", "name": "本年最后一天", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定日期的本年最后一天,格式为"yyyy-MM-dd",无参数则默认返回当前日期的本年最后一天\n【返回值类型】:字符串(String)\n【示例】:本年最后一天("2019-01-30T01:00:00+08:00")【返回值】:"2019-12-31"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "FirstDayOfLastYear", "name": "上年第一天", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定日期的上年第一天,格式为"yyyy-MM-dd",无参数则默认返回当前日期的上年第一天\n【返回值类型】:字符串(String)\n【示例】:上年第一天("2019-01-30T01:00:00+08:00")【返回值】:"2018-01-01"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "LastDayOfLastYear", "name": "上年最后一天", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定日期的上年最后一天,格式为"yyyy-MM-dd",无参数则默认返回当前日期的上年最后一天\n【返回值类型】:字符串(String)\n【示例】:上年最后一天("2019-01-30T01:00:00+08:00")【返回值】:"2018-12-31"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "FirstDayOfNextYear", "name": "下年第一天", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定日期的下年第一天,格式为"yyyy-MM-dd",无参数则默认返回当前日期的下年第一天\n【返回值类型】:字符串(String)\n【示例】:下年第一天("2019-01-30T01:00:00+08:00")【返回值】:"2020-01-01"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "LastDayOfNextYear", "name": "下年最后一天", "params": [ { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定日期的下年最后一天,格式为"yyyy-MM-dd",无参数则默认返回当前日期的下年最后一天\n【返回值类型】:字符串(String)\n【示例】:下年最后一天("2019-01-30T01:00:00+08:00")【返回值】:"2020-12-31"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" }, { "key": "GetDate", "name": "返回指定格式的日期", "params": [ { "key": "format", "name": "格式", "type": "string" }, { "key": "date", "name": "日期时间", "type": "string" } ], "description": `【功能】:返回指定形式的日期,无参数则默认返回当前日期的指定格式日期\n【返回值类型】:字符串(String)\n DD:今天 LD:昨天 ND:明天 YY:本年 LY:上年 NY:下年 MM:本月 LM:上月 NM:下月 \n WD:星期几 WW:本周 LW:上周 NW:下周 FDW:本周首日 LDW:本周尾日 \n FDLW:上周首日 LDLW:上周尾日 FDNW:下周首日 LDNW:下周尾日 \n FDM:本月首日 LDM:本月尾日 FDLM:上月首日 LDLM:上月尾日 FDNM:下月首日 LDNM:下月尾日 \n FDY:本年首日 LDY:本年尾日 FDLY:上年首日 LDLY:上年尾日 FDNY:下年首日 LDNY:下年尾日 \n 【示例】:返回指定格式的日期("LD","2019-01-30T01:00:00+08:00")【返回值】:"2019-01-29"`, "type": "DateTime", "keyFront": "DefaultFunction", "className": "" } ]