7110 lines
198 KiB
Markdown
7110 lines
198 KiB
Markdown
# Builtin - 基础函数
|
||
|
||
## 函数
|
||
|
||
### `time()`
|
||
|
||
日期时间处理函数。
|
||
|
||
返回:datetime
|
||
|
||
### `decodeTime(value, hour, minute, second, millisecond)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------- | ---- | ---- |
|
||
| `value` | any | |
|
||
| `hour` | any | |
|
||
| `minute` | any | |
|
||
| `second` | any | |
|
||
| `millisecond` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `dayOfWeek(value)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
|
||
返回:any
|
||
|
||
### `encodeTime(hour, minute, second, millisecond)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------- | ---- | ---- |
|
||
| `hour` | any | |
|
||
| `minute` | any | |
|
||
| `second` | any | |
|
||
| `millisecond` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `now()`
|
||
|
||
日期时间相关函数。
|
||
|
||
返回:any
|
||
|
||
### `decodeDate(value, year, month, day)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---- |
|
||
| `value` | any | |
|
||
| `year` | any | |
|
||
| `month` | any | |
|
||
| `day` | datetime | |
|
||
|
||
返回:datetime
|
||
|
||
### `date()`
|
||
|
||
日期时间处理函数。
|
||
|
||
返回:datetime
|
||
|
||
### `tryEncodeDate(year, month, day, out_date)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---------- | -------- | ---- |
|
||
| `year` | any | |
|
||
| `month` | any | |
|
||
| `day` | datetime | |
|
||
| `out_date` | datetime | |
|
||
|
||
返回:datetime
|
||
|
||
### `tryEncodeTime(hour, minute, second, millisecond, out_time)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------- | -------- | ---- |
|
||
| `hour` | any | |
|
||
| `minute` | any | |
|
||
| `second` | any | |
|
||
| `millisecond` | any | |
|
||
| `out_time` | datetime | |
|
||
|
||
返回:datetime
|
||
|
||
### `decodeDateFully(value, year, month, day, day_of_week)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------- | -------- | ---- |
|
||
| `value` | any | |
|
||
| `year` | any | |
|
||
| `month` | any | |
|
||
| `day` | datetime | |
|
||
| `day_of_week` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `encodeDate(year, month, day)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---- |
|
||
| `year` | any | |
|
||
| `month` | any | |
|
||
| `day` | datetime | |
|
||
|
||
返回:datetime
|
||
|
||
### `tryStrToDate(s, value)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ------ | ---- |
|
||
| `s` | string | |
|
||
| `value` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `strToDateTimeDef(s, default)`
|
||
|
||
将字符串转换为对应类型。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ------ | ---- |
|
||
| `s` | string | |
|
||
| `default` | any | |
|
||
|
||
返回:string
|
||
|
||
### `dateTimeToInternetStr(end_t, arg2)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---- |
|
||
| `end_t` | datetime | |
|
||
| `arg2` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `incAMonth(year, month, day, arg4)`
|
||
|
||
常用日期时间函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---- |
|
||
| `year` | any | |
|
||
| `month` | any | |
|
||
| `day` | datetime | |
|
||
| `arg4` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `currentYear()`
|
||
|
||
日期时间相关函数。
|
||
|
||
返回:any
|
||
|
||
### `dateTimeGmtToHttpStr(end_t)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---- |
|
||
| `end_t` | datetime | |
|
||
|
||
返回:datetime
|
||
|
||
### `dateToStr(value)`
|
||
|
||
将输入值转换为字符串。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
|
||
返回:string
|
||
|
||
### `strToTimeDef(s, default)`
|
||
|
||
将字符串转换为对应类型。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ------ | ---- |
|
||
| `s` | string | |
|
||
| `default` | any | |
|
||
|
||
返回:string
|
||
|
||
### `dateTimeToStr(value)`
|
||
|
||
将输入值转换为字符串。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
|
||
返回:string
|
||
|
||
### `formaTDateTime(format, date_time)`
|
||
|
||
按指定格式输出结果。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----------- | -------- | ---- |
|
||
| `format` | string | |
|
||
| `date_time` | datetime | |
|
||
|
||
返回:datetime
|
||
|
||
### `dateTimeGmtToCookieStr(end_t)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---- |
|
||
| `end_t` | datetime | |
|
||
|
||
返回:datetime
|
||
|
||
### `isLeapYear(year)`
|
||
|
||
判断条件是否成立。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `year` | any | |
|
||
|
||
返回:bool
|
||
|
||
### `gmtToLocalDateTime(s)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | ---- |
|
||
| `s` | string | |
|
||
|
||
返回:datetime
|
||
|
||
### `timeToStr(value)`
|
||
|
||
常用日期时间函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ----- | ---- |
|
||
| `value` | float | |
|
||
|
||
返回:datetime
|
||
|
||
### `strToDateDef(s, default)`
|
||
|
||
将字符串转换为对应类型。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ------ | ---- |
|
||
| `s` | string | |
|
||
| `default` | any | |
|
||
|
||
返回:string
|
||
|
||
### `tryStrToDateTime(s, value)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ------ | ---- |
|
||
| `s` | string | |
|
||
| `value` | any | |
|
||
|
||
返回:datetime
|
||
|
||
## 普通日期函数
|
||
|
||
### `isInLeapYear(date)`
|
||
|
||
判断条件是否成立。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | -------- | ---- |
|
||
| `date` | datetime | |
|
||
|
||
返回:bool
|
||
|
||
### `isPm(arg1)`
|
||
|
||
判断条件是否成立。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:bool
|
||
|
||
### `isValidDate(value, arg2, arg3)`
|
||
|
||
判断条件是否成立。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
| `arg2` | any | |
|
||
| `arg3` | any | |
|
||
|
||
返回:bool
|
||
|
||
### `isValidTime(value, arg2, arg3, arg4)`
|
||
|
||
判断条件是否成立。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
| `arg2` | any | |
|
||
| `arg3` | any | |
|
||
| `arg4` | any | |
|
||
|
||
返回:bool
|
||
|
||
### `isValidDateTime(value, arg2, arg3, arg4, arg5, arg6, arg7)`
|
||
|
||
判断条件是否成立。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
| `arg2` | any | |
|
||
| `arg3` | any | |
|
||
| `arg4` | any | |
|
||
| `arg5` | any | |
|
||
| `arg6` | any | |
|
||
| `arg7` | any | |
|
||
|
||
返回:bool
|
||
|
||
### `isValidDateDay(value, arg2)`
|
||
|
||
判断条件是否成立。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:bool
|
||
|
||
### `isValidDateWeek(value, arg2, arg3)`
|
||
|
||
判断条件是否成立。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
| `arg2` | any | |
|
||
| `arg3` | any | |
|
||
|
||
返回:bool
|
||
|
||
### `isValidDateMonthWeek(value, arg2, arg3, arg4)`
|
||
|
||
判断条件是否成立。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
| `arg2` | any | |
|
||
| `arg3` | any | |
|
||
| `arg4` | any | |
|
||
|
||
返回:bool
|
||
|
||
### `weeksInYear(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `weeksInAYear(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `daysInYear(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `daysInAYear(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `daysInMonth(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `daysInAMonth(arg1, arg2)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:any
|
||
|
||
### `today()`
|
||
|
||
日期时间相关函数。
|
||
|
||
返回:any
|
||
|
||
### `yesterday()`
|
||
|
||
日期时间相关函数。
|
||
|
||
返回:any
|
||
|
||
### `tomorrow()`
|
||
|
||
日期时间相关函数。
|
||
|
||
返回:any
|
||
|
||
### `isToday(aday)`
|
||
|
||
判断条件是否成立。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `aday` | any | |
|
||
|
||
返回:bool
|
||
|
||
### `isSameDay(aday, today)`
|
||
|
||
判断条件是否成立。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `aday` | any | |
|
||
| `today` | any | |
|
||
|
||
返回:bool
|
||
|
||
## 简单转换函数
|
||
|
||
### `dateToInt(value)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `intToDate(value)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
|
||
返回:datetime
|
||
|
||
## 分解函数
|
||
|
||
### `dateOf(value)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `timeOf(value)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `yearOf(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `monthOf(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `dayOf(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `hourOf(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `minuteOf(arg1)`
|
||
|
||
进行数值统计计算。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `secondOf(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `milliSecondOf(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
## 起始结束函数
|
||
|
||
### `startOfTheYear(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `endOfTheYear(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `startOfAYear(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `endOfAYear(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `startOfTheMonth(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `endOfTheMonth(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `startOfAMonth(arg1, arg2)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:any
|
||
|
||
### `endOfAMonth(arg1, arg2)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:any
|
||
|
||
### `startOfTheWeek(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `endOfTheWeek(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `startOfAWeek(arg1, arg2, arg3)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
| `arg3` | any | |
|
||
|
||
返回:any
|
||
|
||
### `endOfAWeek(arg1, arg2, arg3)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
| `arg3` | any | |
|
||
|
||
返回:any
|
||
|
||
### `startOfTheDay(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `endOfTheDay(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `startOfADay(arg1, arg2, arg3)`
|
||
|
||
起始结束函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
| `arg3` | any | |
|
||
|
||
返回:any
|
||
|
||
### `endOfADay(arg1, arg2, arg3)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
| `arg3` | any | |
|
||
|
||
返回:any
|
||
|
||
## 关系函数
|
||
|
||
### `hourOfTheYear(arg1)`
|
||
|
||
关系函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `hourOfTheMonth(arg1)`
|
||
|
||
关系函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `monthOfTheYear(arg1)`
|
||
|
||
关系函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `milliSecondOfTheYear(arg1)`
|
||
|
||
关系函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `weekOfTheYear(arg1)`
|
||
|
||
关系函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `weekOfTheMonth(avalue, ayear, amonth)`
|
||
|
||
关系函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| -------- | ---- | ----------------------- |
|
||
| `avalue` | any | TDateTime类型,日期时间 |
|
||
| `ayear` | any | 整数,年,返回值 |
|
||
| `amonth` | any | 整数,月,返回值 |
|
||
|
||
返回:any
|
||
|
||
### `minuteOfTheYear(arg1)`
|
||
|
||
进行数值统计计算。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `secondOfTheYear(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `dayOfTheYear(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `dayOfTheMonth(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `secondOfTheMinute(arg1)`
|
||
|
||
进行数值统计计算。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `hourOfTheWeek(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `secondOfTheMonth(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `dayOfTheWeek(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `minuteOfTheDay(arg1)`
|
||
|
||
进行数值统计计算。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `milliSecondOfTheSecond(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `secondOfTheWeek(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `minuteOfTheMonth(arg1)`
|
||
|
||
进行数值统计计算。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `minuteOfTheHour(arg1)`
|
||
|
||
进行数值统计计算。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `minuteOfTheWeek(arg1)`
|
||
|
||
进行数值统计计算。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `milliSecondOfTheDay(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `milliSecondOfTheMonth(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `hourOfTheDay(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `milliSecondOfTheHour(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `secondOfTheHour(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `milliSecondofTheMinute(arg1)`
|
||
|
||
进行数值统计计算。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `secondOfTheDay(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `milliSecondOfTheWeek(arg1)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
## 范围判定函数
|
||
|
||
### `withinPastYears(arg1, arg2, arg3)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
| `arg3` | any | |
|
||
|
||
返回:any
|
||
|
||
### `withinPastMonths(arg1, arg2, arg3)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
| `arg3` | any | |
|
||
|
||
返回:any
|
||
|
||
### `withinPastWeeks(arg1, arg2, arg3)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
| `arg3` | any | |
|
||
|
||
返回:any
|
||
|
||
### `withinPastDays(arg1, arg2, arg3)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
| `arg3` | any | |
|
||
|
||
返回:any
|
||
|
||
### `withinPastHours(arg1, arg2, arg3)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
| `arg3` | any | |
|
||
|
||
返回:any
|
||
|
||
### `withinPastMinutes(arg1, arg2, arg3)`
|
||
|
||
进行数值统计计算。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
| `arg3` | any | |
|
||
|
||
返回:any
|
||
|
||
### `withinPastSeconds(arg1, arg2, arg3)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
| `arg3` | any | |
|
||
|
||
返回:any
|
||
|
||
### `withinPastMilliSeconds(anow, athen, arg3)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `anow` | any | |
|
||
| `athen` | any | |
|
||
| `arg3` | any | |
|
||
|
||
返回:any
|
||
|
||
## 范围获得函数
|
||
|
||
### `yearsBetween(arg1, arg2)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:any
|
||
|
||
### `monthsBetween(arg1, arg2)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:any
|
||
|
||
### `weeksBetween(arg1, arg2)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:any
|
||
|
||
### `daysBetween(arg1, arg2)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:any
|
||
|
||
### `hoursBetween(arg1, arg2)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:any
|
||
|
||
### `minutesBetween(arg1, arg2)`
|
||
|
||
进行数值统计计算。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:any
|
||
|
||
### `secondsBetween(arg1, arg2)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:any
|
||
|
||
### `milliSecondsBetween(beg_t, end_t)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---- |
|
||
| `beg_t` | datetime | |
|
||
| `end_t` | datetime | |
|
||
|
||
返回:any
|
||
|
||
## 范围生成函数
|
||
|
||
### `yearSpan(arg1, arg2)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:any
|
||
|
||
### `monthSpan(arg1, arg2)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:any
|
||
|
||
### `weekSpan(beg_t, end_t)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---- |
|
||
| `beg_t` | datetime | |
|
||
| `end_t` | datetime | |
|
||
|
||
返回:any
|
||
|
||
### `daySpan(beg_t, end_t)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---- |
|
||
| `beg_t` | datetime | |
|
||
| `end_t` | datetime | |
|
||
|
||
返回:any
|
||
|
||
### `hourSpan(arg1, arg2)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:any
|
||
|
||
### `minuteSpan(beg_t, end_t)`
|
||
|
||
进行数值统计计算。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---- |
|
||
| `beg_t` | datetime | |
|
||
| `end_t` | datetime | |
|
||
|
||
返回:any
|
||
|
||
### `secondSpan(beg_t, end_t)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---- |
|
||
| `beg_t` | datetime | |
|
||
| `end_t` | datetime | |
|
||
|
||
返回:any
|
||
|
||
## 时间推移函数
|
||
|
||
### `incYear(arg1, arg2)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:any
|
||
|
||
### `incMonth(arg1, arg2)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:any
|
||
|
||
### `incWeek(arg1, arg2)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:any
|
||
|
||
### `incDay(arg1, arg2)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:any
|
||
|
||
### `incHour(arg1, arg2)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:any
|
||
|
||
### `incMinute(arg1, arg2)`
|
||
|
||
进行数值统计计算。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:any
|
||
|
||
### `incSecond(arg1, arg2)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:any
|
||
|
||
### `incMilliSecond(arg1, arg2)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:any
|
||
|
||
## 组合、分解日期函数
|
||
|
||
### `encodeDateTime(value, arg2, arg3, arg4, arg5, arg6, arg7)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
| `arg2` | any | |
|
||
| `arg3` | any | |
|
||
| `arg4` | any | |
|
||
| `arg5` | any | |
|
||
| `arg6` | any | |
|
||
| `arg7` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `decodeDateTime(end_t, year, month, day, hour, minute, second, millisecond)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------- | -------- | ---- |
|
||
| `end_t` | datetime | |
|
||
| `year` | any | |
|
||
| `month` | any | |
|
||
| `day` | datetime | |
|
||
| `hour` | any | |
|
||
| `minute` | any | |
|
||
| `second` | any | |
|
||
| `millisecond` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `encodeDateWeek(value, arg2, arg3)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
| `arg2` | any | |
|
||
| `arg3` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `decodeDateWeek(value, year, weekofyear, dayofweek)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------ | ---- | ---- |
|
||
| `value` | any | |
|
||
| `year` | any | |
|
||
| `weekofyear` | any | |
|
||
| `dayofweek` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `decodeDateDay(value, year, dayofyear)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----------- | ---- | ---- |
|
||
| `value` | any | |
|
||
| `year` | any | |
|
||
| `dayofyear` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `encodeDateMonthWeek(value, arg2, arg3, arg4)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
| `arg2` | any | |
|
||
| `arg3` | any | |
|
||
| `arg4` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `decodeDateMonthWeek(value, year, month, weekof_month, day_of_week1)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| -------------- | ---- | ---- |
|
||
| `value` | any | |
|
||
| `year` | any | |
|
||
| `month` | any | |
|
||
| `weekof_month` | any | |
|
||
| `day_of_week1` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `tryEncodeDateTime(value, arg2, arg3, arg4, arg5, arg6, arg7, atime)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
| `arg2` | any | |
|
||
| `arg3` | any | |
|
||
| `arg4` | any | |
|
||
| `arg5` | any | |
|
||
| `arg6` | any | |
|
||
| `arg7` | any | |
|
||
| `atime` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `tryEncodeDateWeek(value, arg2, atime, arg4)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
| `arg2` | any | |
|
||
| `atime` | any | |
|
||
| `arg4` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `tryEncodeDateDay(value, arg2, atime)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
| `arg2` | any | |
|
||
| `atime` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `tryEncodeDateMonthWeek(value, arg2, arg3, arg4, atime)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
| `arg2` | any | |
|
||
| `arg3` | any | |
|
||
| `arg4` | any | |
|
||
| `atime` | any | |
|
||
|
||
返回:datetime
|
||
|
||
## 日期重组函数
|
||
|
||
### `recodeYear(arg1, arg2)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:any
|
||
|
||
### `recodeMonth(arg1, arg2)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:any
|
||
|
||
### `recodeDay(arg1, arg2)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:any
|
||
|
||
### `recodeHour(arg1, arg2)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:any
|
||
|
||
### `recodeMinute(arg1, arg2)`
|
||
|
||
进行数值统计计算。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:any
|
||
|
||
### `recodeSecond(arg1, arg2)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:any
|
||
|
||
### `recodeMilliSecond(arg1, arg2)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:any
|
||
|
||
### `recodeDate(value, arg2, arg3, arg4)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
| `arg2` | any | |
|
||
| `arg3` | any | |
|
||
| `arg4` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `recodeTime(value, arg2, arg3, arg4, arg5)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
| `arg2` | any | |
|
||
| `arg3` | any | |
|
||
| `arg4` | any | |
|
||
| `arg5` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `recodeDateTime(value, arg2, arg3, arg4, arg5, arg6, arg7, arg8)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
| `arg2` | any | |
|
||
| `arg3` | any | |
|
||
| `arg4` | any | |
|
||
| `arg5` | any | |
|
||
| `arg6` | any | |
|
||
| `arg7` | any | |
|
||
| `arg8` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `tryRecodeDateTime(value, arg2, arg3, arg4, arg5, arg6, arg7, arg8, aresult)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ---- | ---- |
|
||
| `value` | any | |
|
||
| `arg2` | any | |
|
||
| `arg3` | any | |
|
||
| `arg4` | any | |
|
||
| `arg5` | any | |
|
||
| `arg6` | any | |
|
||
| `arg7` | any | |
|
||
| `arg8` | any | |
|
||
| `aresult` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `compareDateTime(value, arg2)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `sameDateTime(value, arg2)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `compareDate(value, arg2)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `sameDate(value, arg2)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `compareTime(value, arg2)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `sameTime(value, arg2)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `nthDayOfWeek(end_t)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---- |
|
||
| `end_t` | datetime | |
|
||
|
||
返回:any
|
||
|
||
### `decodeDayOfWeekInMonth(endt, ayear, amonth, anth_day_of_week, aday_of_week)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------------ | ---- | ---- |
|
||
| `endt` | any | |
|
||
| `ayear` | any | |
|
||
| `amonth` | any | |
|
||
| `anth_day_of_week` | any | |
|
||
| `aday_of_week` | any | |
|
||
|
||
返回:any
|
||
|
||
### `encodeDayOfWeekInMonth(arg1, arg2, arg3, arg4)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
| `arg3` | any | |
|
||
| `arg4` | any | |
|
||
|
||
返回:any
|
||
|
||
### `tryEncodeDayOfWeekInMonth(arg1, arg2, arg3, arg4, newtime)`
|
||
|
||
日期时间相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
| `arg3` | any | |
|
||
| `arg4` | any | |
|
||
| `newtime` | any | |
|
||
|
||
返回:any
|
||
|
||
## 日期格式的转换
|
||
|
||
### `dateTimeToJulianDate(value)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `julianDateToDateTime(value)`
|
||
|
||
日期格式的转换相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ----- | ---- |
|
||
| `value` | float | |
|
||
|
||
返回:datetime
|
||
|
||
### `tryJulianDateToDateTime(value, t)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ----- | ---- |
|
||
| `value` | float | |
|
||
| `t` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `dateTimeToModifiedJulianDate(value)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `modifiedJulianDateToDateTime(value)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ----- | ---- |
|
||
| `value` | float | |
|
||
|
||
返回:datetime
|
||
|
||
### `tryModifiedJulianDateToDateTime(value, t)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ----- | ---- |
|
||
| `value` | float | |
|
||
| `t` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `dateTimeToUnix(value)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `unixToDateTime(value)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `dateTimeToFileDate(end_t)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---- |
|
||
| `end_t` | datetime | |
|
||
|
||
返回:datetime
|
||
|
||
## 宽字节日期格式转换函数
|
||
|
||
### `dateTimeGmtToCookieStrw(value)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `dateTimeGmtToHttpStrw(value)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `dateTimeToInternetStrw(value, arg2)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `datetimetostrw(value)`
|
||
|
||
宽字节日期格式转换函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
|
||
返回:datetime
|
||
|
||
### `timetoStrw(value)`
|
||
|
||
将输入值转换为字符串。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
|
||
返回:string
|
||
|
||
### `dateToStrw(value)`
|
||
|
||
将输入值转换为字符串。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---- |
|
||
| `value` | datetime | |
|
||
|
||
返回:string
|
||
|
||
## 常用字符串函数
|
||
|
||
### `strCmp(s1, s2)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | ---- |
|
||
| `s1` | string | |
|
||
| `s2` | string | |
|
||
|
||
返回:string
|
||
|
||
### `chr(arg1)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:string
|
||
|
||
### `wideChr(arg1)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:string
|
||
|
||
### `format(formatstr, v1, v2, v3)`
|
||
|
||
按指定格式输出结果。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----------- | ------ | ----- |
|
||
| `formatstr` | string | |
|
||
| `v1` | any | float |
|
||
| `v2` | any | |
|
||
| `v3` | any | |
|
||
|
||
返回:string
|
||
|
||
### `setLength(s, new_length)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------ | ------ | ---- |
|
||
| `s` | string | |
|
||
| `new_length` | any | |
|
||
|
||
返回:string
|
||
|
||
### `compareText(s1, s2)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | ---- |
|
||
| `s1` | string | |
|
||
| `s2` | string | |
|
||
|
||
返回:string
|
||
|
||
### `copy(s, index, count)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ------ | ---- |
|
||
| `s` | string | |
|
||
| `index` | any | |
|
||
| `count` | any | |
|
||
|
||
返回:string
|
||
|
||
### `upperCase(s)`
|
||
|
||
进行大小写转换。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | ---- |
|
||
| `s` | string | |
|
||
|
||
返回:string
|
||
|
||
### `leftBStr(a_text, a_count)`
|
||
|
||
进行字符串提取或替换处理。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ------ | ---- |
|
||
| `a_text` | string | |
|
||
| `a_count` | any | |
|
||
|
||
返回:string
|
||
|
||
### `rightBStr(a_text, a_count)`
|
||
|
||
进行字符串提取或替换处理。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ------ | ---- |
|
||
| `a_text` | string | |
|
||
| `a_count` | any | |
|
||
|
||
返回:string
|
||
|
||
### `midBStr(a_text, astart, a_count)`
|
||
|
||
常用字符串函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ------ | ---- |
|
||
| `a_text` | string | |
|
||
| `astart` | any | |
|
||
| `a_count` | any | |
|
||
|
||
返回:string
|
||
|
||
### `getFormatLocalCode()`
|
||
|
||
按指定格式输出结果。
|
||
|
||
返回:string
|
||
|
||
### `str(value, s)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
| `s` | any | |
|
||
|
||
返回:string
|
||
|
||
### `compareStr(s1, s2)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | ---- |
|
||
| `s1` | string | |
|
||
| `s2` | string | |
|
||
|
||
返回:string
|
||
|
||
### `trim(s)`
|
||
|
||
去除字符串首尾空白字符(空格、换行等)。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | ----------- |
|
||
| `s` | string | s(字符串) |
|
||
|
||
返回:string
|
||
|
||
### `sameText(s1, s2)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | ---- |
|
||
| `s1` | string | |
|
||
| `s2` | string | |
|
||
|
||
返回:string
|
||
|
||
### `appendStr(dest, s)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ------ | ---- |
|
||
| `dest` | string | |
|
||
| `s` | string | |
|
||
|
||
返回:string
|
||
|
||
### `getChar(s, index)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ------ | ---- |
|
||
| `s` | string | |
|
||
| `index` | any | |
|
||
|
||
返回:string
|
||
|
||
### `lowerCase(s)`
|
||
|
||
进行大小写转换。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | ---- |
|
||
| `s` | string | |
|
||
|
||
返回:string
|
||
|
||
### `setFormatLocalCode(arg1)`
|
||
|
||
按指定格式输出结果。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:string
|
||
|
||
### `val(s, v, code)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ------ | ---- |
|
||
| `s` | string | |
|
||
| `v` | any | |
|
||
| `code` | string | |
|
||
|
||
返回:string
|
||
|
||
### `pos(arg1, arg2)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ------ | ---- |
|
||
| `arg1` | string | |
|
||
| `arg2` | string | |
|
||
|
||
返回:string
|
||
|
||
### `trimRight(s)`
|
||
|
||
去除字符串末尾空白字符。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | ----------- |
|
||
| `s` | string | s(字符串) |
|
||
|
||
返回:string
|
||
|
||
### `trimLeft(s)`
|
||
|
||
去除字符串开头空白字符。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | ----------- |
|
||
| `s` | string | s(字符串) |
|
||
|
||
返回:string
|
||
|
||
### `strToIntDef(s, default)`
|
||
|
||
将字符串转换为对应类型。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ------ | ---- |
|
||
| `s` | string | |
|
||
| `default` | any | |
|
||
|
||
返回:string
|
||
|
||
### `formatFloat(format, value)`
|
||
|
||
按指定格式输出结果。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| -------- | ------ | ---- |
|
||
| `format` | string | |
|
||
| `value` | any | |
|
||
|
||
返回:string
|
||
|
||
### `strToCurrDef(s, default)`
|
||
|
||
将字符串转换为对应类型。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ------ | ---- |
|
||
| `s` | string | |
|
||
| `default` | any | |
|
||
|
||
返回:string
|
||
|
||
### `booltostr2(value)`
|
||
|
||
常用字符串函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
|
||
返回:string
|
||
|
||
### `strToFloatDef(s, default)`
|
||
|
||
将字符串转换为对应类型。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ------ | ---- |
|
||
| `s` | string | |
|
||
| `default` | any | |
|
||
|
||
返回:string
|
||
|
||
### `intToHex(arg1, arg2)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:string
|
||
|
||
### `tryStrToInt(s, value)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ------ | ---- |
|
||
| `s` | string | |
|
||
| `value` | any | |
|
||
|
||
返回:string
|
||
|
||
### `floatToStr(value)`
|
||
|
||
将输入值转换为字符串。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ----- | ---- |
|
||
| `value` | float | |
|
||
|
||
返回:string
|
||
|
||
### `tryStrToFloat(s, value)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ------ | ---- |
|
||
| `s` | string | |
|
||
| `value` | any | |
|
||
|
||
返回:string
|
||
|
||
### `formatCurr(format, value)`
|
||
|
||
按指定格式输出结果。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| -------- | ------ | ---- |
|
||
| `format` | string | |
|
||
| `value` | float | |
|
||
|
||
返回:string
|
||
|
||
### `tryStrToCurr(s, value)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ------ | ---- |
|
||
| `s` | string | |
|
||
| `value` | any | |
|
||
|
||
返回:string
|
||
|
||
### `boolToStr(value, arg2)`
|
||
|
||
将输入值转换为字符串。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:string
|
||
|
||
### `currToStr(value)`
|
||
|
||
将输入值转换为字符串。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ----- | ---- |
|
||
| `value` | float | |
|
||
|
||
返回:string
|
||
|
||
### `tryStrToBool(s, value)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ------ | ---- |
|
||
| `s` | string | |
|
||
| `value` | any | |
|
||
|
||
返回:string
|
||
|
||
### `isValidIdent(ident)`
|
||
|
||
判断条件是否成立。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ------ | ---- |
|
||
| `ident` | string | |
|
||
|
||
返回:bool
|
||
|
||
### `strToBoolDef(s, default)`
|
||
|
||
将字符串转换为对应类型。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ------ | ---- |
|
||
| `s` | string | |
|
||
| `default` | any | |
|
||
|
||
返回:string
|
||
|
||
### `intToStr(value)`
|
||
|
||
将输入值转换为字符串。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
|
||
返回:string
|
||
|
||
### `sysEncodecryptStr(s, t)`
|
||
|
||
常用字符串函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | ---- |
|
||
| `s` | string | |
|
||
| `t` | any | |
|
||
|
||
返回:string
|
||
|
||
### `strToInt64Def(s, default)`
|
||
|
||
将字符串转换为对应类型。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ------ | ---- |
|
||
| `s` | string | |
|
||
| `default` | any | |
|
||
|
||
返回:string
|
||
|
||
### `tryStrToInt64(s, value)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ------ | ---- |
|
||
| `s` | string | |
|
||
| `value` | any | |
|
||
|
||
返回:string
|
||
|
||
### `strToInt32Def(s, default)`
|
||
|
||
将字符串转换为对应类型。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ------ | ---- |
|
||
| `s` | string | |
|
||
| `default` | any | |
|
||
|
||
返回:string
|
||
|
||
### `tryStrToInt32(s, value)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ------ | ---- |
|
||
| `s` | string | |
|
||
| `value` | any | |
|
||
|
||
返回:string
|
||
|
||
## 判定函数
|
||
|
||
### `ansiContainsText(a_text, a_sub_text)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------ | ------ | ---- |
|
||
| `a_text` | string | |
|
||
| `a_sub_text` | string | |
|
||
|
||
返回:string
|
||
|
||
### `ansiStartsText(a_sub_text, a_text)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------ | ------ | ---- |
|
||
| `a_sub_text` | string | |
|
||
| `a_text` | string | |
|
||
|
||
返回:string
|
||
|
||
### `ansiEndsText(a_sub_text, a_text)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------ | ------ | ---- |
|
||
| `a_sub_text` | string | |
|
||
| `a_text` | string | |
|
||
|
||
返回:string
|
||
|
||
### `ansiContainsStr(a_text, a_sub_text)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------ | ------ | ---- |
|
||
| `a_text` | string | |
|
||
| `a_sub_text` | string | |
|
||
|
||
返回:string
|
||
|
||
### `ansiStartsStr(a_sub_text, a_text)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------ | ------ | ---- |
|
||
| `a_sub_text` | string | |
|
||
| `a_text` | string | |
|
||
|
||
返回:string
|
||
|
||
### `ansiEndsStr(a_sub_text, a_text)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------ | ------ | ---- |
|
||
| `a_sub_text` | string | |
|
||
| `a_text` | string | |
|
||
|
||
返回:string
|
||
|
||
## 替换以及处理函数
|
||
|
||
### `stuffString(a_text, a_start, alength, a_sub_text)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------ | ------ | ---- |
|
||
| `a_text` | string | |
|
||
| `a_start` | any | |
|
||
| `alength` | any | |
|
||
| `a_sub_text` | string | |
|
||
|
||
返回:string
|
||
|
||
### `ansiReplaceText(a_text, a_from_text, a_to_text)`
|
||
|
||
进行字符串提取或替换处理。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------- | ------ | ---- |
|
||
| `a_text` | string | |
|
||
| `a_from_text` | string | |
|
||
| `a_to_text` | string | |
|
||
|
||
返回:string
|
||
|
||
### `ansiReplaceStr(a_text, a_from_text, a_to_text)`
|
||
|
||
进行字符串提取或替换处理。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------- | ------ | ---- |
|
||
| `a_text` | string | |
|
||
| `a_from_text` | string | |
|
||
| `a_to_text` | string | |
|
||
|
||
返回:string
|
||
|
||
### `replaceText(a_text, a_from_text, a_to_text)`
|
||
|
||
进行字符串提取或替换处理。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------- | ------ | ---- |
|
||
| `a_text` | string | |
|
||
| `a_from_text` | string | |
|
||
| `a_to_text` | string | |
|
||
|
||
返回:string
|
||
|
||
### `replaceStr(a_text, a_from_text, a_to_text)`
|
||
|
||
进行字符串提取或替换处理。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------- | ------ | ---- |
|
||
| `a_text` | string | |
|
||
| `a_from_text` | string | |
|
||
| `a_to_text` | string | |
|
||
|
||
返回:string
|
||
|
||
### `reverseString(s)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | ---- |
|
||
| `s` | string | |
|
||
|
||
返回:string
|
||
|
||
## 重复函数
|
||
|
||
### `dupeString(a_text, a_count)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ------ | ---- |
|
||
| `a_text` | string | |
|
||
| `a_count` | any | |
|
||
|
||
返回:string
|
||
|
||
## 字节函数
|
||
|
||
### `startsText(a_sub_text, a_text)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------ | ------ | ---- |
|
||
| `a_sub_text` | string | |
|
||
| `a_text` | string | |
|
||
|
||
返回:string
|
||
|
||
### `endsText(a_sub_text, a_text)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------ | ------ | ---- |
|
||
| `a_sub_text` | string | |
|
||
| `a_text` | string | |
|
||
|
||
返回:string
|
||
|
||
### `containsStr(a_text, a_sub_text)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------ | ------ | ---- |
|
||
| `a_text` | string | |
|
||
| `a_sub_text` | string | |
|
||
|
||
返回:string
|
||
|
||
### `startsStr(a_sub_text, a_text)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------ | ------ | ---- |
|
||
| `a_sub_text` | string | |
|
||
| `a_text` | string | |
|
||
|
||
返回:string
|
||
|
||
### `endsStr(a_sub_text, a_text)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------ | ------ | ---- |
|
||
| `a_sub_text` | string | |
|
||
| `a_text` | string | |
|
||
|
||
返回:string
|
||
|
||
### `stuffbString(a_text, a_star, alength, a_sub_text)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------ | ------ | ---- |
|
||
| `a_text` | string | |
|
||
| `a_star` | any | |
|
||
| `alength` | any | |
|
||
| `a_sub_text` | string | |
|
||
|
||
返回:string
|
||
|
||
### `getPyStringList()`
|
||
|
||
获取拼音字符串列表对象。
|
||
|
||
返回:array
|
||
|
||
### `soundEx(a_text, alength)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ------ | ---- |
|
||
| `a_text` | string | |
|
||
| `alength` | any | |
|
||
|
||
返回:string
|
||
|
||
### `soundexInt(a_text, alength)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ------ | ---- |
|
||
| `a_text` | string | |
|
||
| `alength` | any | |
|
||
|
||
返回:string
|
||
|
||
### `decodeSoundexInt(arg1)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:string
|
||
|
||
### `decodeSoundexWord(arg1)`
|
||
|
||
发音相关函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
### `soundexProc(a_text, a_other)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ------ | ---- |
|
||
| `a_text` | string | |
|
||
| `a_other` | string | |
|
||
|
||
返回:string
|
||
|
||
### `ansiResemblesText(a_text, a_other)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ------ | ---- |
|
||
| `a_text` | string | |
|
||
| `a_other` | string | |
|
||
|
||
返回:string
|
||
|
||
## 正则表达式函数
|
||
|
||
### `parseRegExpr(reg_expr, parse_text, parse_ctrls, matched, matched_pos, matched_len)`
|
||
|
||
正则表达式函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------- | ------ | ---- |
|
||
| `reg_expr` | string | |
|
||
| `parse_text` | string | |
|
||
| `parse_ctrls` | string | |
|
||
| `matched` | any | |
|
||
| `matched_pos` | any | |
|
||
| `matched_len` | any | |
|
||
|
||
返回:array
|
||
|
||
### `getLikeFlag()`
|
||
|
||
正则表达式函数相关函数。
|
||
|
||
返回:any
|
||
|
||
### `setLikeFlag(arg1)`
|
||
|
||
正则表达式函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
|
||
返回:any
|
||
|
||
## 多语言支持函数
|
||
|
||
### `nextCharIndex(s, index)`
|
||
|
||
多语言支持函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ------ | ---- |
|
||
| `s` | string | |
|
||
| `index` | any | |
|
||
|
||
返回:any
|
||
|
||
### `ansiToUtf8(s)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | ---- |
|
||
| `s` | string | |
|
||
|
||
返回:string
|
||
|
||
### `utf8ToAnsi(s)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | ---- |
|
||
| `s` | string | |
|
||
|
||
返回:string
|
||
|
||
### `charToByteIndex(s, index)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ------ | ---- |
|
||
| `s` | string | |
|
||
| `index` | any | |
|
||
|
||
返回:string
|
||
|
||
### `byteToCharLen(s, max_len)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ------ | ---- |
|
||
| `s` | string | |
|
||
| `max_len` | any | |
|
||
|
||
返回:string
|
||
|
||
### `ansiPos(arg1, arg2)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ------ | ---- |
|
||
| `arg1` | string | |
|
||
| `arg2` | string | |
|
||
|
||
返回:string
|
||
|
||
### `charToByteLen(s, max_len)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ------ | ---- |
|
||
| `s` | string | |
|
||
| `max_len` | any | |
|
||
|
||
返回:string
|
||
|
||
### `charLength(s, index)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ------ | ---- |
|
||
| `s` | string | |
|
||
| `index` | any | |
|
||
|
||
返回:string
|
||
|
||
### `byteToCharIndex(s, index)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ------ | ---- |
|
||
| `s` | string | |
|
||
| `index` | any | |
|
||
|
||
返回:string
|
||
|
||
### `byteType(s, index)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ------ | ---- |
|
||
| `s` | string | |
|
||
| `index` | any | |
|
||
|
||
返回:string
|
||
|
||
### `booltostrw(value)`
|
||
|
||
多语言支持函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
|
||
返回:any
|
||
|
||
### `unicodeEsc(s)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | ---- |
|
||
| `s` | string | |
|
||
|
||
返回:string
|
||
|
||
### `floattoStrw(value)`
|
||
|
||
多语言支持函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ----- | ---- |
|
||
| `value` | float | |
|
||
|
||
返回:any
|
||
|
||
### `unUnicodeEsCw(s)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | ---- |
|
||
| `s` | string | |
|
||
|
||
返回:string
|
||
|
||
### `currtoStrw(value)`
|
||
|
||
多语言支持函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ----- | ---- |
|
||
| `value` | float | |
|
||
|
||
返回:any
|
||
|
||
### `inttostrw(value)`
|
||
|
||
多语言支持函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
|
||
返回:any
|
||
|
||
### `booltostrw2(value)`
|
||
|
||
多语言支持函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | |
|
||
|
||
返回:any
|
||
|
||
### `strw(value, s)`
|
||
|
||
多语言支持函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ----- | ---- |
|
||
| `value` | float | |
|
||
| `s` | any | |
|
||
|
||
返回:any
|
||
|
||
### `inttohexw(arg1, arg2)`
|
||
|
||
多语言支持函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `arg1` | any | |
|
||
| `arg2` | any | |
|
||
|
||
返回:any
|
||
|
||
### `multiByteToUnicodew(s, cp)`
|
||
|
||
多语言支持函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | ---- |
|
||
| `s` | string | |
|
||
| `cp` | any | |
|
||
|
||
返回:any
|
||
|
||
### `utf8ToUnicode(s)`
|
||
|
||
多语言支持函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | ---- |
|
||
| `s` | string | |
|
||
|
||
返回:any
|
||
|
||
### `exportjsonstring(s)`
|
||
|
||
多语言支持函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ---- |
|
||
| `s` | array | |
|
||
|
||
返回:any
|
||
|
||
### `unUnicodeEsc(s)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | ---- |
|
||
| `s` | string | |
|
||
|
||
返回:string
|
||
|
||
### `ifwstring(value[, arg2])`
|
||
|
||
多语言支持函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ----- | ---- |
|
||
| `value` | array | |
|
||
| `arg2` | any | |
|
||
|
||
返回:any
|
||
|
||
### `exportJsonStringUtf8(a)`
|
||
|
||
多语言支持函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ---- | ---- |
|
||
| `a` | any | |
|
||
|
||
返回:any
|
||
|
||
### `exportJsonStringMbcs(s)`
|
||
|
||
将字符串或数组序列化为 JSON 字符串,保留中文原码(MBCS),不转义为 \\uXXXX。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ---- |
|
||
| `s` | array | |
|
||
|
||
返回:array
|
||
|
||
## 多字节语言支持函数(补充)
|
||
|
||
### `lengthW(atext)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ------ | ---- |
|
||
| `atext` | string | |
|
||
|
||
返回:string
|
||
|
||
### `midStr(a_text, astart, a_count)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ------ | ---- |
|
||
| `a_text` | string | |
|
||
| `astart` | any | |
|
||
| `a_count` | any | |
|
||
|
||
返回:string
|
||
|
||
## 文件名以及目录名相关处理函数
|
||
|
||
### `changeFileExt(file_name, extension)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----------- | ------ | ---- |
|
||
| `file_name` | string | |
|
||
| `extension` | string | |
|
||
|
||
返回:string
|
||
|
||
### `extractFilePath(file_name)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----------- | ------ | ---- |
|
||
| `file_name` | string | |
|
||
|
||
返回:string
|
||
|
||
### `extractFileDir(file_name)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----------- | ------ | ---- |
|
||
| `file_name` | string | |
|
||
|
||
返回:string
|
||
|
||
### `extractFileDrive(file_name)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----------- | ------ | ---- |
|
||
| `file_name` | string | |
|
||
|
||
返回:string
|
||
|
||
### `extractFileName(file_name)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----------- | ------ | ---- |
|
||
| `file_name` | string | |
|
||
|
||
返回:string
|
||
|
||
### `extractFileExt(file_name)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----------- | ------ | ---- |
|
||
| `file_name` | string | |
|
||
|
||
返回:string
|
||
|
||
### `extractRelativePath(base_name, dest_name)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----------- | ------ | ---- |
|
||
| `base_name` | string | |
|
||
| `dest_name` | string | |
|
||
|
||
返回:string
|
||
|
||
### `isPathDelimiter(s, index)`
|
||
|
||
判断条件是否成立。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ------ | ---- |
|
||
| `s` | string | |
|
||
| `index` | any | |
|
||
|
||
返回:bool
|
||
|
||
### `isDelimiter(delimiters, s, index)`
|
||
|
||
判断条件是否成立。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------ | ------ | ---- |
|
||
| `delimiters` | string | |
|
||
| `s` | string | |
|
||
| `index` | any | |
|
||
|
||
返回:bool
|
||
|
||
### `includeTrailingPathDelimiter(s)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | ---- |
|
||
| `s` | string | |
|
||
|
||
返回:string
|
||
|
||
### `includeTrailingBackslash(s)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | ---- |
|
||
| `s` | string | |
|
||
|
||
返回:string
|
||
|
||
### `excludeTrailingPathDelimiter(s)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | ---- |
|
||
| `s` | string | |
|
||
|
||
返回:string
|
||
|
||
### `excludeTrailingBackslash(s)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | ---- |
|
||
| `s` | string | |
|
||
|
||
返回:string
|
||
|
||
### `lastDelimiter(delimiters, s)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------ | ------ | ---- |
|
||
| `delimiters` | string | |
|
||
| `s` | string | |
|
||
|
||
返回:string
|
||
|
||
### `ansiCompareFileName(s1, s2)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | ---- |
|
||
| `s1` | string | |
|
||
| `s2` | string | |
|
||
|
||
返回:string
|
||
|
||
### `sameFileName(s1, s2)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | ---- |
|
||
| `s1` | string | |
|
||
| `s2` | string | |
|
||
|
||
返回:string
|
||
|
||
### `ansiLowerCaseFileName(s)`
|
||
|
||
进行大小写转换。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | ---- |
|
||
| `s` | string | |
|
||
|
||
返回:string
|
||
|
||
### `ansiUpperCaseFileName(s)`
|
||
|
||
进行大小写转换。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | ---- |
|
||
| `s` | string | |
|
||
|
||
返回:string
|
||
|
||
## 数组下标以及长度相关函数
|
||
|
||
### `getStrindexnum(value)`
|
||
|
||
数组相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ----- | ---- |
|
||
| `value` | array | |
|
||
|
||
返回:array
|
||
|
||
### `getstrindexs(value)`
|
||
|
||
数组相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ----- | ---- |
|
||
| `value` | array | |
|
||
|
||
返回:array
|
||
|
||
### `getintindexs(value)`
|
||
|
||
数组下标以及长度相关函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ----- | ---- |
|
||
| `value` | array | |
|
||
|
||
返回:array
|
||
|
||
### `getAllIndexs(value)`
|
||
|
||
数组相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ----- | ---- |
|
||
| `value` | array | |
|
||
|
||
返回:array
|
||
|
||
### `length(value)`
|
||
|
||
数组相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ----- | ---- |
|
||
| `value` | array | |
|
||
|
||
返回:array
|
||
|
||
## 排序函数
|
||
|
||
### `sortTableByField(value, field, sortdir)`
|
||
|
||
排序函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ------ | ---- |
|
||
| `value` | array | |
|
||
| `field` | string | |
|
||
| `sortdir` | any | |
|
||
|
||
返回:any
|
||
|
||
## 增删改查
|
||
|
||
### `filterIn(r, v, field, b_return_sub_result)`
|
||
|
||
增删改查相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------------------- | ----- | ---- |
|
||
| `r` | array | |
|
||
| `v` | array | |
|
||
| `field` | array | |
|
||
| `b_return_sub_result` | bool | |
|
||
|
||
返回:any
|
||
|
||
### `filterNotIn(r, v, field, b_return_sub_result)`
|
||
|
||
增删改查相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------------------- | ------ | ---- |
|
||
| `r` | array | |
|
||
| `v` | array | |
|
||
| `field` | string | |
|
||
| `b_return_sub_result` | bool | |
|
||
|
||
返回:any
|
||
|
||
## 数字
|
||
|
||
### `floatN(r, n)`
|
||
|
||
使用银行家算法进行四舍五入,精确到10Adigit位。“四舍六入五考虑,五后非零就进一,五后皆零看奇偶,五前为偶应舍去,五前为奇要进一”
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ------------------------ |
|
||
| `r` | float | 实数 |
|
||
| `n` | any | 整型数据,保留的小数位数 |
|
||
|
||
返回:float
|
||
|
||
### `floatToStrEx(r, n)`
|
||
|
||
浮点->字符串
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ------------------------ |
|
||
| `r` | float | 实数 |
|
||
| `n` | any | 整型数据,保留的小数位数 |
|
||
|
||
返回:string
|
||
|
||
## 日期时间 / 起始结束函数
|
||
|
||
### `startOfADay(a_year, a_month, a_day, a_year_2)`
|
||
|
||
返回由参数Ayear、Amonth、ADay指定的年月日的最初时间,也就是将日期设定为当天,将时间部分置0 返回由参数Ayear指定的年份的第AdayOfYear天的最初时间,也就是将日期设定为当天,将时间部分置0
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---------- | -------- | -------------------------------------------------------------------------- |
|
||
| `a_year` | any | 整数,年,定义域是\[1,9999\] |
|
||
| `a_month` | any | 整数,月,定义域是\[1,12\] |
|
||
| `a_day` | datetime | 整数,日,定义域是\[1,31\] |
|
||
| `a_year_2` | any | 整数,年,年份,定义域是\[1,9999\];AdayOfYear:整数,年,表示当年的第几天 |
|
||
|
||
返回:datetime
|
||
|
||
### `endOfADay(a_year, a_month, a_day, a_year_2)`
|
||
|
||
返回由参数Ayear、Amonth、ADay指定的年月日的结束时间,也就是将日期设定为当天,将时间部分置为下午11:59:59:999,返回类型是TDateTime 返回由参数Ayear指定的年份的第AdayOfYear天的结束时间,也就是将日期设定为当天,将时间部分置为下午11:59:59:999,返回类型是TDateTime
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---------- | -------- | ------------------------------------------------------------------------------------------------ |
|
||
| `a_year` | any | 整数,年,年份,定义域是\[1,9999\] |
|
||
| `a_month` | any | 整数,月,月份,定义域是\[1,12\] |
|
||
| `a_day` | datetime | 整数,日,日期,定义域是\[1,31\];已废弃-定义2:EndOfADay(AYear, ADayOfYear: Integer): TDateTime; |
|
||
| `a_year_2` | any | 整数,年,年份,定义域是\[1,9999\];AdayOfYear:整数,年,表示当年的第几天 |
|
||
|
||
返回:datetime
|
||
|
||
## 日期时间 / 范围生成函数
|
||
|
||
### `milliSecondSpan(a_now, athen)`
|
||
|
||
得到参数ANow和参数AThen之间的相距的毫秒数 与SecondBetween函数相同。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---------------------- |
|
||
| `a_now` | datetime | 日期时间类型,日期时间 |
|
||
| `athen` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:float
|
||
|
||
## 字符串 / 常用字符串函数
|
||
|
||
### `concat(s_n)`
|
||
|
||
返回s1+s2+s3+…sn合并的字符串,支持unicode串(宽字节字符集)进行合并。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----- | ------ | ------ |
|
||
| `s_n` | string | 字符串 |
|
||
|
||
返回:string
|
||
|
||
### `ansiFormat(formatstr, v1)`
|
||
|
||
返回根据formatstr设定的格式将v1,v2,v3…参数连成字符串返回。 Format中的占位计算,一个汉字为一个,而在AnsiFormat中一个汉字的占位为两个,其余功能均参见Format。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----------- | ------ | ------------------------------------------------------------------------------ |
|
||
| `formatstr` | string | 格式串,指明后面的参数的输出格式。 |
|
||
| `v1` | any | 各种类型,并对应formatstr中的各种类型;v2,v3…:可选参数,任意类型,指定的数值。 |
|
||
|
||
返回:string
|
||
|
||
### `tostring(v)`
|
||
|
||
将数值转成字符串类型
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ---- |
|
||
| `v` | float | 数值 |
|
||
|
||
返回:string
|
||
|
||
## 字符串 / 发音相关函数
|
||
|
||
### `soundexSimilar(a_text, a_other, a_length)`
|
||
|
||
判断两个字符串Atext和AOther是否发音相似
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---------- | ------ | --------------------------------------- |
|
||
| `a_text` | string | 字符串,发音比较字符串1 |
|
||
| `a_other` | string | 字符串,发音比较字符串2 |
|
||
| `a_length` | any | 判断长度,一般为4,备用参数,暂时无效。 |
|
||
|
||
返回:string
|
||
|
||
### `soundexCompare(a_text, a_other, a_length)`
|
||
|
||
比较两个字符串的发音。根据AText和Aother转成发音码以后用AnsiCompareStr函数比较两个发音码。 如果两个发音码相同,返回0, 如果AText的发音码小于Aother的发音码返回一个负数 如果AText的发音码大于Aother的发音码返回一个正数
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---------- | ------ | --------------------------------------- |
|
||
| `a_text` | string | 字符串,发音比较字符串1 |
|
||
| `a_other` | string | 字符串,发音比较字符串2 |
|
||
| `a_length` | any | 判断长度,一般为4,该参数备用,暂时无效 |
|
||
|
||
返回:string
|
||
|
||
## 字符串 / 正则表达式函数
|
||
|
||
### `parseRegExpr(reg_expr, parse_text, parse_ctrls, rstr)`
|
||
|
||
替换功能,正则表达式匹配后按指定串进行替换。如果操作成功,返回1,并将替换后的结果保存在 Result变量中。 如果匹配不成功或者正则表达式编译错误,则返回字符串类型,为不成功的原因。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------- | ------ | ----------------------------------------------------------------------------------- |
|
||
| `reg_expr` | string | 字符串类型,正则表达式,基本兼容于Perl 5的正则表达式,查看正则表达式中的元字符 |
|
||
| `parse_text` | string | 字符串类型。需要被匹配的源串。 |
|
||
| `parse_ctrls` | string | 字符串类型。正则表达式控制串。,必须包括"r",字符控制定义请参考函数定义中的该参数。 |
|
||
| `rstr` | string | 替换内容的匹配串,支持两种方式 |
|
||
|
||
返回:string
|
||
|
||
## 字符串 / 多语言支持函数
|
||
|
||
### `multiByteToUnicode(s, cp)`
|
||
|
||
把一个ANSI编码方式转换为Unicode编码。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | ---------------------------------- |
|
||
| `s` | string | 字符串,ANSI字符串 |
|
||
| `cp` | any | 整数,代码页。中文为936或者54936。 |
|
||
|
||
返回:string
|
||
|
||
### `unicodetomultibyte(s, cp)`
|
||
|
||
把一个Unicode编码方式转换为ANSI编码。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | ---------------------------------- |
|
||
| `s` | string | 字符串,Unicode字符串。 |
|
||
| `cp` | any | 整数,代码页。中文为936或者54936。 |
|
||
|
||
返回:string
|
||
|
||
### `lcMapString(s, lcid, flag)`
|
||
|
||
编码转化函数,参考WINDOWS API LCMapString。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ------ | ------------ |
|
||
| `s` | string | 字符串。 |
|
||
| `lcid` | any | 标识ID。 |
|
||
| `flag` | any | 转换的参数。 |
|
||
|
||
返回:string
|
||
|
||
### `unicodeEsc2(s)`
|
||
|
||
把一个字符串转换成为\uxxxx的Unicode编码串。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | ------------------ |
|
||
| `s` | string | 字符串,Ansi字符串 |
|
||
|
||
返回:string
|
||
|
||
## 数组 / 基本
|
||
|
||
### `isTable(t)`
|
||
|
||
判断是否为数组。如果t为数据表,返回True;否则,返回False
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ------ |
|
||
| `t` | array | 数据表 |
|
||
|
||
返回:bool
|
||
|
||
### `sortArray(value, sortdir)`
|
||
|
||
对一个一维数组进行排序,方向为sortdir;如果省略sortdir参数,默认为1,正序排序;设置为0时,逆序排序。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ----- | -------- |
|
||
| `value` | array | 一维数组 |
|
||
| `sortdir` | bool | object |
|
||
|
||
返回:array
|
||
|
||
## 数组 / 重构函数
|
||
|
||
### `tryStrToTime(value, out_time)`
|
||
|
||
日期时间处理函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---------- | -------- | ---- |
|
||
| `value` | string | |
|
||
| `out_time` | datetime | |
|
||
|
||
返回:datetime
|
||
|
||
### `dateTimeToString(out_text, format_text, value)`
|
||
|
||
将输入值转换为字符串。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------- | ------ | ---- |
|
||
| `out_text` | string | |
|
||
| `format_text` | string | |
|
||
| `value` | any | |
|
||
|
||
返回:string
|
||
|
||
### `concat(arg1, arg2[, arg3][, arg4])`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ------ | ---- |
|
||
| `arg1` | string | |
|
||
| `arg2` | string | |
|
||
| `arg3` | string | |
|
||
| `arg4` | string | |
|
||
|
||
返回:string
|
||
|
||
### `array2Str(arr, arg2)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ------ | ---- |
|
||
| `arr` | array | |
|
||
| `arg2` | string | |
|
||
|
||
返回:string
|
||
|
||
### `rightStr(value, arg2)`
|
||
|
||
进行字符串提取或替换处理。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ------ | ---- |
|
||
| `value` | string | |
|
||
| `arg2` | any | |
|
||
|
||
返回:string
|
||
|
||
### `leftStr(value, arg2)`
|
||
|
||
进行字符串提取或替换处理。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ------ | ---- |
|
||
| `value` | string | |
|
||
| `arg2` | any | |
|
||
|
||
返回:string
|
||
|
||
### `wrapText(const_line, arg2)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------ | ------ | ---- |
|
||
| `const_line` | string | |
|
||
| `arg2` | any | |
|
||
|
||
返回:string
|
||
|
||
### `soundexSimilar(arg1, arg2)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ------ | ---- |
|
||
| `arg1` | string | |
|
||
| `arg2` | string | |
|
||
|
||
返回:string
|
||
|
||
### `soundexCompare(arg1, arg2)`
|
||
|
||
字符串相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ------ | ---- |
|
||
| `arg1` | string | |
|
||
| `arg2` | string | |
|
||
|
||
返回:string
|
||
|
||
### `sortArray(arr)`
|
||
|
||
排序函数相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----- | ----- | ---- |
|
||
| `arr` | array | |
|
||
|
||
返回:any
|
||
|
||
## 基础函数 / 重构函数
|
||
|
||
### `reIndex(a, arg2[, s])`
|
||
|
||
数组相关函数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ----- | ---- |
|
||
| `a` | array | |
|
||
| `arg2` | array | |
|
||
| `s` | array | |
|
||
|
||
返回:array
|
||
|
||
### `dataType(data, n)`
|
||
|
||
根据Data的数据类型返回对应的值。当Data为数组时,N生效,支持对数组中的每个维度或每个单元格进行数据类型的判断。 数据类型对应的整数数值如下: 数据类型对应的整数 整型、布尔型0 实数类型、日期时间类型1 字符串型2 数组型5 图形类型8 图形组合类型9 Nil型10 二进制类型11 表达式类型13(12待定) 对象类型16 Matrix类型17 长整型20 宽字符(WideString)、Unicode24 FMArray27 复数41
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||
| `data` | array | 任意类型数据。 |
|
||
| `n` | any | 整数,可选参数;值为0,对Data进行类型判断。不存在时默认为0。;值为正数,会对Data中的每个单元格的值进行类型判断。;值为负数,会对Data中的前-N个维度的元素数据进行类型判断。 |
|
||
|
||
返回:array
|
||
|
||
### `ifInt(value, n)`
|
||
|
||
判断value是否是一个32位整数类型。可通过可选参数N对数组中的行或元素进行判断。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | -------------------------------- |
|
||
| `value` | any | 任何类型数据 |
|
||
| `n` | any | 可选参数,整数。具体参考返回说明 |
|
||
|
||
返回:bool
|
||
|
||
### `ifInt64(value, n)`
|
||
|
||
判断value是否是一个64位整数类型。可通过可选参数N对数组中的行或元素进行判断。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | -------------------------------- |
|
||
| `value` | any | 任何类型数据 |
|
||
| `n` | any | 可选参数,整数。具体参考返回说明 |
|
||
|
||
返回:bool
|
||
|
||
### `ifReal(value, n)`
|
||
|
||
判断value是否是一个实数类型。可通过可选参数N对数组中的行或元素进行判断。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | -------------------------------- |
|
||
| `value` | any | 任何类型数据 |
|
||
| `n` | any | 可选参数,整数。具体参考返回说明 |
|
||
|
||
返回:bool
|
||
|
||
### `ifNumber(value, n)`
|
||
|
||
判断value是否是一个数字类型(32位整数、64位整数或者实数)。可通过可选参数N对数组中的行或元素进行判断。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | -------------------------------- |
|
||
| `value` | any | 任何类型数据 |
|
||
| `n` | any | 可选参数,整数。具体参考返回说明 |
|
||
|
||
返回:bool
|
||
|
||
### `ifString(value, n)`
|
||
|
||
判断value是否是一个字符串类型。可通过可选参数N对数组中的行或元素进行判断。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | -------------------------------- |
|
||
| `value` | any | 任何类型数据 |
|
||
| `n` | any | 可选参数,整数。具体参考返回说明 |
|
||
|
||
返回:bool
|
||
|
||
### `ifArray(value, n)`
|
||
|
||
判断value是否是一个数组类型。可通过可选参数N对数组中的行或元素进行判断。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | -------------------------------- |
|
||
| `value` | any | 任何类型数据 |
|
||
| `n` | any | 可选参数,整数。具体参考返回说明 |
|
||
|
||
返回:bool
|
||
|
||
### `ifNil(value, n)`
|
||
|
||
判断value是否为空。可通过可选参数N对数组中的行或元素进行判断。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | -------------------------------- |
|
||
| `value` | any | 任意类型数据。 |
|
||
| `n` | any | 可选参数,整数。具体参考返回说明 |
|
||
|
||
返回:bool
|
||
|
||
### `ifExp(value, n)`
|
||
|
||
判断value是否是一个表达式类型。可通过可选参数N对数组中的行或元素进行判断。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | -------------------------------- |
|
||
| `value` | any | 任意类型数据 |
|
||
| `n` | any | 可选参数,整数。具体参考返回说明 |
|
||
|
||
返回:bool
|
||
|
||
### `ifBinary(value, n)`
|
||
|
||
判断value是否是一个二进制类型。可通过可选参数N对数组中的行或元素进行判断。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | -------------------------------- |
|
||
| `value` | any | 任意类型数据 |
|
||
| `n` | any | 可选参数,整数。具体参考返回说明 |
|
||
|
||
返回:bool
|
||
|
||
### `createBinary(len)`
|
||
|
||
创建一个Binary类型。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----- | ---- | ------------------------ |
|
||
| `len` | any | 整数,二进制类型的长度。 |
|
||
|
||
返回:binary
|
||
|
||
### `ifNone(data, none_value)`
|
||
|
||
判别是否是None类型,以及判别值是否是指定NoneValue的None类型 None类型的数据被用在\[1\]算符重载(setter)的中间级
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------ | ----- | ------------------------------------------------------------------------------------------------------------------ |
|
||
| `data` | array | 任意类型 |
|
||
| `none_value` | any | 整型,可选参数,指定None类型里包含的值,如对象set重载应用中,当包none类型包含值-1时,则表示set出错后重新进入的状态 |
|
||
|
||
返回:bool
|
||
|
||
### `setPrecision(number, precision)`
|
||
|
||
从指定精度四舍五入截断小数点位数,返回number的保留小数点Precision位后的值 使用银行家算法对Number进行四舍五入,精确到10Adigit位。“四舍六入五考虑,五后非零就进一,五后皆零看奇偶,五前为偶应舍去,五前为奇要进一”
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----------- | ---- | ------------------------------------------ |
|
||
| `number` | any | 实数/实数数组。 |
|
||
| `precision` | any | 整数,目的是为了截取实数后面小数点的位数。 |
|
||
|
||
返回:array
|
||
|
||
### `toStm(v, gtype, stm_type, p_n)`
|
||
|
||
转换成为STM流数据。可以通过stmType参数控制是否转换为新流模式或超大流新流模式,新的stm流占用空间更少,访问效率更高。 还可以通过添加第四个参数对数据进行精度处理后再转换。 其中,第二个参数为可选参数,特殊场景下使用,一般场景中设置为0。 转换后的数据流可以通过函数stm(t)进行转回。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---------- | ---- | -------------------------------------------------------------------------------------------------------------- |
|
||
| `v` | any | 任意类型数据 |
|
||
| `gtype` | any | 可选参数,图型等特殊类型 ,默认为0 |
|
||
| `stm_type` | any | 可选参数,流模式,0:普通模式;1:新流模式;2:超极大流的紧缩模式;默认为0。其中,超大流模式能处理超大结果集。 |
|
||
| `p_n` | any | 可选参数,精度,默认为-1,全精度 |
|
||
|
||
返回:binary
|
||
|
||
### `toStn(v, n)`
|
||
|
||
转换成为STN字符串。小数位四舍五入,尾数是五就进一。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ---- | ------------------------------------------------------------------------- |
|
||
| `v` | any | 任意类型数据 |
|
||
| `n` | any | 整型,保留小数点后的位数,可选参数。只对v是小数时且v的小数数位比N大有效。 |
|
||
|
||
返回:string
|
||
|
||
### `exportCsv(data, csv_str, include_index, include_header)`
|
||
|
||
将指定数组Data转换为csv格式字符串并存储在csvStr参数中。仅支持一维及二维数组的转换。和ExportCsvne的区别:在处理浮点数据时,ExportCsv的结果会输出为1E15等格式。 支持范围:新一代TSL支持。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---------------- | ------ | ----------------------------------------------- |
|
||
| `data` | array | 数组类型,要转换成csv格式字符串的数组。 |
|
||
| `csv_str` | string | 字符串类型,转换成功的csv格式字符串(输出值)。 |
|
||
| `include_index` | bool | object |
|
||
| `include_header` | bool | object |
|
||
|
||
返回:array
|
||
|
||
### `ifThen(avalue, atrue, a_false)`
|
||
|
||
如果Avalue值为真,返回参数Atrue,否则返回参数Afalse
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ---- | -------------------------- |
|
||
| `avalue` | bool | object |
|
||
| `atrue` | any | 任意类型,Avalue为真返回值 |
|
||
| `a_false` | any | 任意类型,Avalue为假返回值 |
|
||
|
||
返回:bool
|
||
|
||
### `setProfiler(flag)`
|
||
|
||
设置需要记录的优化信息(当设置了记录优化信息的时候,运行速度可能会比正常运行慢很多)并返回设置前的状态值,如果设置了记录优化信息,在平台运行的模型结束的时候会在终端打开优化信息的窗口,用户也可以调用GetProfilerInfo来手动获得优化信息。 注:其中系统类调用的优化信息(值:8)只在新一代中支持
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ------------------------------------------------------------------------------------------------------------------- |
|
||
| `flag` | any | 整数,可省略,若省略则仅返回状态值而不设置。设置需要记录的优化信息,由一个四位二进制数组成,即以下几种常见组合说明: |
|
||
|
||
返回:any
|
||
|
||
### `getProfilerInfo(clear)`
|
||
|
||
获得记录的优化信息。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ------ |
|
||
| `clear` | bool | object |
|
||
|
||
返回:array
|
||
|
||
### `encodeTime(hour, min, sec, m_sec)`
|
||
|
||
将参数指定的Hour, Min, Sec, MSec: Integer作为小时、分钟、秒、毫秒组成一个TDateTime类型返回
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---------- |
|
||
| `hour` | any | 整数,小时 |
|
||
| `min` | any | 整数,分钟 |
|
||
| `sec` | any | 整数,秒 |
|
||
| `m_sec` | any | 整数,毫秒 |
|
||
|
||
返回:datetime
|
||
|
||
### `tryEncodeDate(year, month, day, date)`
|
||
|
||
将参数指定的Year,Month,Day作为年、月、日组成一个TDateTime类型寸到参数Date中。如果转换成功,函数返回真,否则返回假
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ------------ |
|
||
| `year` | any | 整数,年 |
|
||
| `month` | any | 整数,月 |
|
||
| `day` | datetime | 整数,日 |
|
||
| `date` | datetime | 日期,返回值 |
|
||
|
||
返回:bool|datetime
|
||
|
||
### `tryEncodeTime(hour, min, sec, m_sec, time)`
|
||
|
||
将参数指定的Hour, Min, Sec, MSec: Integer作为小时、分钟、秒、毫秒组成一个TDateTime类型寸到参数Time中。如果转换成功,函数返回真,否则返回假
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---------------- |
|
||
| `hour` | any | 整数,小时 |
|
||
| `min` | any | 整数,分钟 |
|
||
| `sec` | any | 整数,秒 |
|
||
| `m_sec` | any | 整数,毫秒 |
|
||
| `time` | datetime | 日期,组成的日期 |
|
||
|
||
返回:bool|datetime
|
||
|
||
### `decodeDate(date_time, year, month, day)`
|
||
|
||
将参数指定的TDateTime类型时间DateTime的年、月、日信息分别存到参数Year,Month,Day中
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----------- | -------- | --------------------------------- |
|
||
| `date_time` | datetime | TDateTime类型,日期时间(输入值) |
|
||
| `year` | any | 整数,年(输出值) |
|
||
| `month` | any | 整数,月(输出值) |
|
||
| `day` | datetime | 整数,日(输出值) |
|
||
|
||
返回:any
|
||
|
||
### `decodeDateFully(date_time, year, month, day, dow)`
|
||
|
||
将参数指定的TDateTime类型时间DateTime的年、月、日以及星期几的信息分别存到参数Year,Month,Day,DOW中。如果是闰年,返回真,否则返回假。如果是公元前的年份,则所有参数返回0
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----------- | -------- | -------------------------------------------------------------------------------- |
|
||
| `date_time` | datetime | TDateTime类型,日期时间 |
|
||
| `year` | any | 整数,年,输出值 |
|
||
| `month` | any | 整数,月,输出值 |
|
||
| `day` | datetime | 整数,日,输出值 |
|
||
| `dow` | any | 整数,星期,输出值;结果和DayOfWeek一致,非ISO8601标准。1-7,星期天为1,星期六为7 |
|
||
|
||
返回:bool
|
||
|
||
### `decodeTime(date_time, hour, min, sec, m_sec)`
|
||
|
||
将参数指定DateTime的时间的小时、分钟、秒、毫秒分别存到参数Hour, Min, Sec, MSec中。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----------- | -------- | ----------------------- |
|
||
| `date_time` | datetime | TDateTime类型,日期时间 |
|
||
| `hour` | any | 整数,小时,输出值 |
|
||
| `min` | any | 整数,分钟,输出值 |
|
||
| `sec` | any | 整数,秒,输出值 |
|
||
| `m_sec` | any | 整数,毫秒,输出值 |
|
||
|
||
返回:any
|
||
|
||
### `dayOfWeek(date_time)`
|
||
|
||
返回星期几,1代表星期天,7代表星期六。非ISO8601标准,如果需要使用ISO8601标准,请使用DayOfTheWeek
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----------- | -------- | ----------------------- |
|
||
| `date_time` | datetime | TDateTime类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `incAMonth(year, month, day, number_of_months)`
|
||
|
||
返回参数Year、Month、Day指定年、月、日的时间之后NumberOfMonths个月的时间,并把这个时间的年、月、日存到参数Year、Month、Day中。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------------ | -------- | -------------- |
|
||
| `year` | any | 整数,年,年份 |
|
||
| `month` | any | 整数,月,月份 |
|
||
| `day` | datetime | 整数,日,日期 |
|
||
| `number_of_months` | any | 整数,月数 |
|
||
|
||
返回:datetime
|
||
|
||
### `dateToStr(date_time)`
|
||
|
||
将TDateTime类型的参数DateTime的日期部分转换成字符串,格式是短日期格式
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----------- | -------- | ----------------------- |
|
||
| `date_time` | datetime | TDateTime类型,日期时间 |
|
||
|
||
返回:string
|
||
|
||
### `timeToStr(date_time)`
|
||
|
||
将TDateTime类型的参数DateTime的时间部分转换成字符串,格式是长时间格式
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----------- | -------- | ----------------------- |
|
||
| `date_time` | datetime | TDateTime类型,日期时间 |
|
||
|
||
返回:string
|
||
|
||
### `dateTimeToStr(date_time)`
|
||
|
||
将TDateTime类型的参数DateTime的日期和时间转换成字符串,格式是短日期加长时间格式
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----------- | -------- | ----------------------- |
|
||
| `date_time` | datetime | TDateTime类型,日期时间 |
|
||
|
||
返回:string
|
||
|
||
### `dateTimeToInternetStr(date, to_gmt)`
|
||
|
||
将日期转为Internet格式字符串Friday, 13Jun2008 22:27:04 +0800,当ToGMT为真时,采用GMT时间格式。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| -------- | -------- | ---------------------------- |
|
||
| `date` | datetime | 日期时间类型,用于转换的时间 |
|
||
| `to_gmt` | bool | object |
|
||
|
||
返回:string
|
||
|
||
### `dateTimeGmtToCookieStr(date)`
|
||
|
||
将日期时间(GMT时间)转为Cookie格式字符串Fri, 13-Jun-2008 23:01:56 GMT。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | -------- | ---------------------------- |
|
||
| `date` | datetime | 日期时间类型,用于转换的时间 |
|
||
|
||
返回:string
|
||
|
||
### `dateTimeGmtToHttpStr(date)`
|
||
|
||
将日期时间(GMT时间)转为HTTP格式字符串Fri, 13 Jun 2008 23:01:56 GMT。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | -------- | ------------------------ |
|
||
| `date` | datetime | 日期时间,用于转换的时间 |
|
||
|
||
返回:string
|
||
|
||
### `dateToInt(date_time)`
|
||
|
||
将日期类型的EndT转换成整数类型
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----------- | -------- | -------- |
|
||
| `date_time` | datetime | 日期类型 |
|
||
|
||
返回:datetime
|
||
|
||
### `intToDate(rdate)`
|
||
|
||
将整型的日期转换成日期类型的日期
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---- |
|
||
| `rdate` | datetime | 整型 |
|
||
|
||
返回:float|datetime
|
||
|
||
### `isInLeapYear(a_value)`
|
||
|
||
判断指定的AValue是否是一个闰年。返回一个布尔真假值
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ------------ |
|
||
| `a_value` | datetime | 日期时间类型 |
|
||
|
||
返回:bool
|
||
|
||
### `isPm(a_value)`
|
||
|
||
判断指定的AValue是否处于下午,就是超过了12:00。返回一个布尔真假值
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ------------ |
|
||
| `a_value` | datetime | 日期时间类型 |
|
||
|
||
返回:bool
|
||
|
||
### `isValidDate(a_year, a_month, a_day)`
|
||
|
||
判断参数指定的的年AYear,月AMonth,日Aday是否是一个有效日期,返回值类型是布尔型真假值 所谓有效,意味着: 年Ayear介于1和9999之间 月AMonth介于1和12之间 日Aday介于1和指定年月的最大天数之间
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | -------------------- |
|
||
| `a_year` | any | 整数,年,指定的年份 |
|
||
| `a_month` | any | 整数,月,指定的月份 |
|
||
| `a_day` | datetime | 整数,日,指定的日期 |
|
||
|
||
返回:bool
|
||
|
||
### `isValidTime(a_hour, a_minute, a_second, a_milli_second)`
|
||
|
||
判断参数指定的时间是否有效,包括小时AHour,分钟AMinute,秒ASecond,毫秒AmilliSecond,返回值类型是布尔型真假值 所谓有效,意味着: 小时AHour介于0和24之间,并且,如果Ahour为24,分钟Aminute和Asecond和AmilliSecond必须为0,否则返回假 分钟AMinute介于0和59之间 秒ASecond介于0和59之间 毫秒AMilliSecond介于0和999之间
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---------------- | ---- | -------------------------------------- |
|
||
| `a_hour` | any | 整数,小时 |
|
||
| `a_minute` | any | 整数,分钟 |
|
||
| `a_second` | any | 整数,秒 |
|
||
| `a_milli_second` | any | 整数,毫秒;布尔,有效为真,无效为假。 |
|
||
|
||
返回:bool
|
||
|
||
### `isValidDateTime(a_year, a_month, a_day, a_hour, a_month_2, a_second, amilli_second)`
|
||
|
||
判断参数指定的日期以及时间是否有效,包括小时AHour ,分钟AMinute,秒ASecond,毫秒AmilliSecond,返回值类型是布尔型真假值。 所谓有效,意味着: 年Ayear介于1和9999之间 月AMonth介于1和12之间 日Aday介于1和指定年月的最大天数之间 小时AHour介于0和24之间,并且,如果Ahour为24,分钟Aminute和Asecond和AmilliSecond必须为0,否则返回假 分钟AMinute介于0和59之间 秒ASecond介于0和59之间 毫秒AMilliSecond介于0和999之间
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------------- | -------- | -------------------- |
|
||
| `a_year` | any | 整数,年,指定的年份 |
|
||
| `a_month` | any | 整数,月,指定的月份 |
|
||
| `a_day` | datetime | 整数,日,指定的日期 |
|
||
| `a_hour` | any | 整数,小时,小时 |
|
||
| `a_month_2` | any | 整数,月,分钟 |
|
||
| `a_second` | any | 整数,秒 |
|
||
| `amilli_second` | any | 整数,毫秒 |
|
||
|
||
返回:bool
|
||
|
||
### `isValidDateWeek(a_year, aweek_of_year, aday_of_week)`
|
||
|
||
判断参数指定的年以及此年的第AweekOfYear周以及此周的第AdayOfWeek天是否是有效日期。返回值类型是布尔型真假值 所谓有效,意味着: 年Ayear介于1和9999之间 周数AWeekOfYear介于1和指定Ayear年的最大周数 AdayOfWeek介于1和7之间
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------------- | ---- | ----------------------------- |
|
||
| `a_year` | any | 整数,指定的年份 |
|
||
| `aweek_of_year` | any | 整数,表示在Ayear年份的第几周 |
|
||
| `aday_of_week` | any | 整数,表示指定周的第几天 |
|
||
|
||
返回:bool
|
||
|
||
### `isValidDateMonthWeek(a_year, a_month, aweek_of_month, aday_of_week)`
|
||
|
||
判断参数指定的年以及此年的第Amonth月以及此月的第AWeekOfMonth周以及此周的第AdayOfWeek天是否是有效日期。返回值类型是布尔型真假值 所谓有效,意味着: 年Ayear介于1和9999之间 月AMonth介于1和12之间 周数AWeekOfYear介于1和指定年月的最大周数 AdayOfWeek介于1和7之间
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---------------- | ---- | ----------------------------------- |
|
||
| `a_year` | any | 整数,年份 |
|
||
| `a_month` | any | 整数,月份 |
|
||
| `aweek_of_month` | any | 整数,表示在Ayear年Amonth月的第几周 |
|
||
| `aday_of_week` | any | 整数,表示指定周的第几天 |
|
||
|
||
返回:bool
|
||
|
||
### `weeksInYear(a_value)`
|
||
|
||
返回AValue所在的年份共含有多少个周。周数的认定是依据ISO8601的标准,关于此标准的解释请参阅附注。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | -------- |
|
||
| `a_value` | datetime | 日期类型 |
|
||
|
||
返回:any
|
||
|
||
### `weeksInAYear(a_year)`
|
||
|
||
返回年份AYear共含有多少个周。周数的认定是依据ISO8601的标准,关于此标准的解释请参阅附注。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| -------- | ---- | --------------------------- |
|
||
| `a_year` | any | 整数,年,定义域\[1,9999\] |
|
||
|
||
返回:any
|
||
|
||
### `daysInYear(a_value)`
|
||
|
||
返回AValue所在的年份共含有多少天。参数:
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | -------- |
|
||
| `a_value` | datetime | 日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `daysInAYear(a_year)`
|
||
|
||
返回年份AYear共含有多少天。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| -------- | ---- | --------------------------- |
|
||
| `a_year` | any | 整数,年,定义域\[1,9999\] |
|
||
|
||
返回:any
|
||
|
||
### `daysInMonth(a_value)`
|
||
|
||
返回AValue所在的月份共含有多少天。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ---- |
|
||
| `a_value` | datetime | 日期 |
|
||
|
||
返回:any
|
||
|
||
### `daysInAMonth(a_year, a_month)`
|
||
|
||
返回由Ayear指定的年的第Amonth月共含有多少天。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ---- | --------------------------- |
|
||
| `a_year` | any | 整数,年,定义域\[1,9999\] |
|
||
| `a_month` | any | 整数,月,定义域\[1,12\] |
|
||
|
||
返回:any
|
||
|
||
### `isToday(a_value)`
|
||
|
||
判断参数AValue的日期是否在今天,返回值类型是布尔型真假值,如果在今天为真,否则为假
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | -------- |
|
||
| `a_value` | datetime | 日期类型 |
|
||
|
||
返回:bool
|
||
|
||
### `isSameDay(a_value, a_basis)`
|
||
|
||
判断参数AValue和参数Abasis是否在同一天发生。返回值类型是布尔型真假值,如果是同一天,返回真,否则为假
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | -------- |
|
||
| `a_value` | datetime | 日期类型 |
|
||
| `a_basis` | datetime | 日期类型 |
|
||
|
||
返回:bool
|
||
|
||
### `dateOf(a_value)`
|
||
|
||
截取日期时间类型的日期数据
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ------------ |
|
||
| `a_value` | datetime | 日期时间类型 |
|
||
|
||
返回:datetime
|
||
|
||
### `timeOf(a_value)`
|
||
|
||
返回一个只含有时间信息的TDateTime类型,天数部分设为0,就是1899年12月30日
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ------------ |
|
||
| `a_value` | datetime | 日期时间类型 |
|
||
|
||
返回:datetime
|
||
|
||
### `yearOf(a_value)`
|
||
|
||
返回参数AValue中包含的年份信息。值域\[1,9999\]
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | -------- |
|
||
| `a_value` | datetime | 日期类型 |
|
||
|
||
返回:any
|
||
|
||
### `monthOf(a_value)`
|
||
|
||
返回参数AValue中包含的月份信息。值域\[1,12\]
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | -------------- |
|
||
| `a_value` | datetime | 日期类型,日期 |
|
||
|
||
返回:any
|
||
|
||
### `dayOf(a_value)`
|
||
|
||
返回参数AValue中包含的日期信息。值域\[1,31\]
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | -------------- |
|
||
| `a_value` | datetime | 日期类型,日期 |
|
||
|
||
返回:any
|
||
|
||
### `hourOf(a_value)`
|
||
|
||
返回参数AValue中包含的小时信息。值域\[0,23\],同函数是HourOfTheDay
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ------------------ |
|
||
| `a_value` | datetime | 日期类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `minuteOf(a_value)`
|
||
|
||
返回参数AValue中包含的分钟信息。值域\[0,59\]
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `secondOf(a_value)`
|
||
|
||
返回参数AValue中包含的秒信息。值域\[0,59\],
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `milliSecondOf(a_value)`
|
||
|
||
返回参数AValue中包含的毫秒信息。值域\[0,999\],
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `startOfTheYear(a_value)`
|
||
|
||
返回参数AValue中包含的年份的最初时间,将日期设定为1月1日,无时间部分。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | -------------- |
|
||
| `a_value` | datetime | 日期类型,日期 |
|
||
|
||
返回:datetime
|
||
|
||
### `endOfTheYear(a_value)`
|
||
|
||
返回参数AValue中所属年的最后一个年自然日的日期时间,如果输入的参数AValue中包含时间数据,则返回的日期中也包含时间数据;否则无时间部分。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ------------------ |
|
||
| `a_value` | datetime | 日期类型,日期时间 |
|
||
|
||
返回:datetime
|
||
|
||
### `startOfAYear(a_year)`
|
||
|
||
返回参数Ayear指定的年份的年初时间,返回的年初日期无时间部分
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| -------- | ---- | ----------------------------- |
|
||
| `a_year` | any | 整数,年,定义域是\[1,9999\] |
|
||
|
||
返回:datetime
|
||
|
||
### `endOfAYear(a_year)`
|
||
|
||
返回参数Ayear指定的年份的结束时间,将日期设定为12月31日,时间部分为23:59:59:999,返回类型是日期时间
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| -------- | ---- | ----------------------------- |
|
||
| `a_year` | any | 整数,年,定义域是\[1,9999\] |
|
||
|
||
返回:datetime
|
||
|
||
### `startOfTheMonth(a_value)`
|
||
|
||
返回参数AValue指定的年月的月初时间,将日期设定为当月的第1自然日,时间部分为0。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ----------------------- |
|
||
| `a_value` | datetime | TDateTime类型,日期时间 |
|
||
|
||
返回:datetime
|
||
|
||
### `endOfTheMonth(a_value)`
|
||
|
||
返回参数AValue指定的年月的月结束时间,将日期设定为当月最后1个自然日,将时间部分为23:59:59:999,返回类型是TDateTime
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ----------------------- |
|
||
| `a_value` | datetime | TDateTime类型,日期时间 |
|
||
|
||
返回:datetime
|
||
|
||
### `startOfAMonth(a_year, a_month)`
|
||
|
||
返回参数AYear指定的年份的AMonth月的最初时间,将日期设定为当月第1自然日,时间部分为0
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ---- | ----------------------------- |
|
||
| `a_year` | any | 整数,年,定义域是\[1,9999\] |
|
||
| `a_month` | any | 整数,月,定义域是\[1,12\] |
|
||
|
||
返回:datetime
|
||
|
||
### `endOfAMonth(a_year, a_month)`
|
||
|
||
返回参数AYear指定的年份的AMonth月的最初时间,将日期设定为当月最后一日,将时间部分置为下午11:59:59:999,返回类型是TDateTime
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ---- | ----------------------------- |
|
||
| `a_year` | any | 整数,年,定义域是\[1,9999\] |
|
||
| `a_month` | any | 整数,月,定义域是\[1,12\] |
|
||
|
||
返回:datetime
|
||
|
||
### `startOfTheWeek(a_value)`
|
||
|
||
返回参数AValue指定的时间所属周的最初时间,将日期设定为当周的第1个自然日,时间部分为0
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ----------------------- |
|
||
| `a_value` | datetime | TDateTime类型,日期时间 |
|
||
|
||
返回:datetime
|
||
|
||
### `endOfTheWeek(a_value)`
|
||
|
||
返回参数AValue指定的时间所属周的结束时间,将日期设定为当周的最后1个自然日,将时间部分置为下午11:59:59:999,返回类型是TDateTime
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:datetime
|
||
|
||
### `startOfAWeek(a_year, aweek_of_year, aday_of_week)`
|
||
|
||
返回参数AYear指定的年份的第AWeekOfYear周的最初时间,将日期设定为当周的第1日,无时间部分。 其中如何确定某年第一周的方法遵循ISO8601原则
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------------- | ---- | ----------------------------------------------- |
|
||
| `a_year` | any | 整数,年,定义域是\[1,9999\] |
|
||
| `aweek_of_year` | any | 整数,年,表示当年的第几周 |
|
||
| `aday_of_week` | any | 整数,表示当周的第几天,默认为1,既一周的最开始 |
|
||
|
||
返回:datetime
|
||
|
||
### `endOfAWeek(a_year, aweek_of_year, aday_of_week)`
|
||
|
||
返回参数AYear指定的年份的第AWeekOfYear周的结束时间,如果不设定参数ADayOfWeek,则取当周最后一个自然日,时间部分为23:59:59:999,返回类型是TDateTime。 其中如何确定某年第一周的方法遵循ISO8601原则
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------------- | ---- | ------------------------------------------------- |
|
||
| `a_year` | any | 整数,年,定义域是\[1,9999\] |
|
||
| `aweek_of_year` | any | 整数,年,表示当年的第几周 |
|
||
| `aday_of_week` | any | 整数,表示当周的第几天,默认为7,既一周的最后一天 |
|
||
|
||
返回:datetime
|
||
|
||
### `startOfTheDay(a_value)`
|
||
|
||
返回由参数AValue指定的日期的最初时间,也就是将日期设定为当天,将时间部分置0,返回类型是日期
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ----------------------- |
|
||
| `a_value` | datetime | TDateTime类型,日期时间 |
|
||
|
||
返回:datetime
|
||
|
||
### `endOfTheDay(a_value)`
|
||
|
||
返回由参数AValue指定的日期的结束时间,也就是将日期设定为当天,时间部分为23:59:59:999,返回类型是日期时间
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:datetime
|
||
|
||
### `monthOfTheYear(a_value)`
|
||
|
||
返回由参数AValue指定的月份是当年的第几个月,与MonthOf函数相同。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ---- |
|
||
| `a_value` | datetime | 日期 |
|
||
|
||
返回:any
|
||
|
||
### `weekOfTheYear(a_value)`
|
||
|
||
返回由参数AValue指定的时间是处于当年的第几个周,与函数WeekOf相同。返回整数,值域是\[1,53\] 注意:使用了ISO8601标准,这意味着可能指定的时间所处的周不属于当前年份,那么返回的将是相对与其他年份的周数
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | -------------- |
|
||
| `a_value` | datetime | 日期类型,日期 |
|
||
|
||
返回:any
|
||
|
||
### `dayOfTheYear(a_value)`
|
||
|
||
返回由参数AValue指定的日期是当年的第几天。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | -------------- |
|
||
| `a_value` | datetime | 日期类型,日期 |
|
||
|
||
返回:any
|
||
|
||
### `hourOfTheYear(a_value)`
|
||
|
||
返回由参数AValue指定的时间是当年的第几个小时
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `minuteOfTheYear(a_value)`
|
||
|
||
返回由参数AValue指定的时间是当年的第几分钟
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `secondOfTheYear(a_value)`
|
||
|
||
返回由参数AValue指定的时间是当年的第几秒种
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `milliSecondOfTheYear(a_value)`
|
||
|
||
返回由参数AValue指定的时间是当年的第几毫秒
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `dayOfTheMonth(a_value)`
|
||
|
||
返回由参数AValue指定的日期是当月的第几天
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | -------------- |
|
||
| `a_value` | datetime | 日期类型,日期 |
|
||
|
||
返回:any
|
||
|
||
### `hourOfTheMonth(a_value)`
|
||
|
||
返回由参数AValue指定的时间是当月的第几小时
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `minuteOfTheMonth(a_value)`
|
||
|
||
返回由参数AValue指定的时间是当月的第几分钟
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `secondOfTheMonth(a_value)`
|
||
|
||
返回由参数AValue指定的时间是当月的第几秒种
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `milliSecondOfTheMonth(a_value)`
|
||
|
||
返回由参数AValue指定的时间是当月的第几毫秒
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `dayOfTheWeek(a_value)`
|
||
|
||
返回由参数AValue指定的时间是当周的第几天 注意:使用了ISO8601标准,认为星期一是第1天,星期日是第7天
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | -------------- |
|
||
| `a_value` | datetime | 日期类型,日期 |
|
||
|
||
返回:any
|
||
|
||
### `hourOfTheWeek(a_value)`
|
||
|
||
返回由参数AValue指定的时间是当周的第几小时 注意:使用了ISO8601标准,认为星期一是第1天,星期日是第7天
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ------------ |
|
||
| `a_value` | datetime | 日期时间类型 |
|
||
|
||
返回:any
|
||
|
||
### `minuteOfTheWeek(a_value)`
|
||
|
||
返回由参数AValue指定的时间是当周的第几分钟 注意:使用了ISO8601标准,认为星期一是第1天,星期日是第7天
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `secondOfTheWeek(a_value)`
|
||
|
||
返回由参数AValue指定的时间是当周的第几秒钟 注意:使用了ISO8601标准,认为星期一是第1天,星期日是第7天
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `milliSecondOfTheWeek(a_value)`
|
||
|
||
返回由参数AValue指定的时间是当周的第几毫秒 注意:使用了ISO8601标准,认为星期一是第1天,星期日是第7天
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ------------------ |
|
||
| `a_value` | datetime | 日期时间类型,日期 |
|
||
|
||
返回:any
|
||
|
||
### `hourOfTheDay(a_value)`
|
||
|
||
返回由参数AValue指定的时间是当天的第几小时,返回整数,值域是\[1,23\]
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `minuteOfTheDay(a_value)`
|
||
|
||
返回由参数AValue指定的时间是当天的第几分钟,起始点是00:00:00
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `secondOfTheDay(a_value)`
|
||
|
||
返回由参数AValue指定的时间是当天的第几秒,起始点是00:00:00
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `milliSecondOfTheDay(a_value)`
|
||
|
||
返回由参数AValue指定的时间是当天的第几毫秒,起始点是00:00:00
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `minuteOfTheHour(a_value)`
|
||
|
||
返回由参数AValue指定的时间是当前小时的第几分钟
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `secondOfTheHour(a_value)`
|
||
|
||
返回由参数AValue指定的时间是当前小时的第几秒
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `milliSecondOfTheHour(a_value)`
|
||
|
||
返回由参数AValue指定的时间是当前小时的第几毫秒
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `secondOfTheMinute(a_value)`
|
||
|
||
返回由参数AValue指定的时间是当前分钟的第几秒
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `milliSecondOfTheMinute(a_value)`
|
||
|
||
返回由参数AValue指定的时间是当前分钟的第几毫秒
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `milliSecondOfTheSecond(a_value)`
|
||
|
||
返回由参数AValue指定的时间是当前秒钟的第几毫秒
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `withinPastYears(a_now, athen, a_years)`
|
||
|
||
判断时间ANow和时间AThen的时间间隔是否在Ayears年内。 注意:由于函数用到了YearsBetween函数,由于年份不具有相同的长度,例如闰年比非闰年长一天,所以函数的计算是基于一个每年有365.25天的假设进行,并且舍掉了小数尾数。因此会舍去小数部分,所以,如果ANow和Athen相隔不足N+1年,那么WithinPastYears(Anow,Athen,N)返回真
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | -------------------------- |
|
||
| `a_now` | datetime | 日期时间类型,查找时间 |
|
||
| `athen` | datetime | 日期时间类型,查找起始时间 |
|
||
| `a_years` | any | 整数,年份 |
|
||
|
||
返回:bool
|
||
|
||
### `withinPastMonths(a_now, athen, a_months)`
|
||
|
||
判断时间ANow和时间AThen的时间间隔是否在Amonths月内。 注意:由于函数用到了MonthsBetween函数,这个函数考虑了月份不具有有相同的长度,基于一个每月有30.4375天的假设进行月份的统计,会舍去小数部分,所以,如果ANow和Athen相隔小于(N+1)\*30.4375天,那么WithinPastMonths(Anow,Athen,N)返回真
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---------- | -------- | -------------------------- |
|
||
| `a_now` | datetime | 日期时间类型,查找时间 |
|
||
| `athen` | datetime | 日期时间类型,查找起始时间 |
|
||
| `a_months` | any | 整数,月份个数 |
|
||
|
||
返回:bool
|
||
|
||
### `withinPastWeeks(a_now, athen, a_weeks)`
|
||
|
||
判断时间ANow和时间AThen的时间间隔是否在AWeeks周内。 注意:由于函数用到了WeeksBetween函数,因此会舍去小数部分,所以,如果ANow和Athen相隔不足(N+1)\*7天,那么WithinPastWeeks(Anow,Athen,N)返回真
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | -------------------------- |
|
||
| `a_now` | datetime | 日期时间类型,查找时间 |
|
||
| `athen` | datetime | 日期时间类型,查找起始时间 |
|
||
| `a_weeks` | any | 整数,周数 |
|
||
|
||
返回:bool
|
||
|
||
### `withinPastDays(a_now, athen, a_days)`
|
||
|
||
判断时间ANow和时间AThen的时间间隔是否在ADays自然日内,与系统参数无关。 注意:由于函数用到了DaysBetween函数,因此会舍去小数部分,所以,如果ANow和Athen相隔不足N+1日,那么WithinPastDays(Anow,Athen,N)返回真
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| -------- | -------- | -------------------------- |
|
||
| `a_now` | datetime | 日期时间类型,查找时间 |
|
||
| `athen` | datetime | 日期时间类型,查找起始时间 |
|
||
| `a_days` | any | 整数,天数 |
|
||
|
||
返回:bool
|
||
|
||
### `withinPastHours(a_now, athen, a_hours)`
|
||
|
||
判断时间ANow和时间AThen的时间间隔是否在AHours个小时内。 注意:由于函数用到了HoursBetween函数,因此会舍去小数部分,所以,如果ANow和Athen相隔N+1个小时,那么WithinPastHours(Anow,Athen,N)返回真
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | -------------------------- |
|
||
| `a_now` | datetime | 日期时间类型,查找时间 |
|
||
| `athen` | datetime | 日期时间类型,查找起始时间 |
|
||
| `a_hours` | any | 整数,小时个数 |
|
||
|
||
返回:bool
|
||
|
||
### `withinPastMinutes(a_now, athen, a_minutes)`
|
||
|
||
判断时间ANow和时间AThen的时间间隔是否在AMinutes分钟内。 注意:由于函数用到了MinutesBetween函数,因此会舍去小数部分,所以,如果ANow和Athen相隔不足N+1分钟,那么WithinPastMinutes(Anow,Athen,N)返回真
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----------- | -------- | -------------------------- |
|
||
| `a_now` | datetime | 日期时间类型,查找时间 |
|
||
| `athen` | datetime | 日期时间类型,查找起始时间 |
|
||
| `a_minutes` | any | 整数,分钟个数 |
|
||
|
||
返回:bool
|
||
|
||
### `withinPastSeconds(a_now, athen, a_seconds)`
|
||
|
||
判断时间ANow和时间AThen的时间间隔是否在ASeconds秒内。 注意:由于函数用到了SecondsBetween函数,因此会舍去小数部分,所以,如果ANow和Athen相隔不足N+1秒,那么WithinPastSeconds(Anow,Athen,N)返回真
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----------- | -------- | -------------------------- |
|
||
| `a_now` | datetime | 日期时间类型,查找时间 |
|
||
| `athen` | datetime | 日期时间类型,查找起始时间 |
|
||
| `a_seconds` | any | 整数,分钟数 |
|
||
|
||
返回:bool
|
||
|
||
### `withinPastMilliSeconds(a_now, athen, a_milli_seconds)`
|
||
|
||
判断时间ANow和时间AThen的时间间隔是否在AMilliSeconds毫秒内。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----------------- | -------- | -------------------------- |
|
||
| `a_now` | datetime | 日期时间类型,查找时间 |
|
||
| `athen` | datetime | 日期时间类型,查找起始时间 |
|
||
| `a_milli_seconds` | any | 整数,毫秒数 |
|
||
|
||
返回:bool
|
||
|
||
### `yearsBetween(a_now, athen)`
|
||
|
||
得到参数ANow和参数AThen之间的相距的年数。由于年份不具有相同的长度,例如闰年比非闰年长一天,所以函数的计算是基于一个每年有365.25天的假设进行,并且舍掉了小数尾数。因此我们计算一个非闰年的1月1日到12月31日的结果是0年,而计算一个闰年的1月1日到12月31日的结果是1年。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---------------------- |
|
||
| `a_now` | datetime | 日期时间类型,日期时间 |
|
||
| `athen` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `monthsBetween(a_now, athen)`
|
||
|
||
得到参数ANow和参数AThen之间的相距的月数。由于月份不具有有相同的长度,所以函数的计算是基于一个每月有30.4375天的假设进行,并且舍掉了小数尾数。因此我们计算从1月1日到1月28日的结果是0,而计算2月1日到3月1日的结果也是0。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---------------------- |
|
||
| `a_now` | datetime | 日期时间类型,日期时间 |
|
||
| `athen` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `weeksBetween(a_now, athen)`
|
||
|
||
得到参数ANow和参数AThen之间的相距的周数。周数的计算同样舍掉了小数尾数。例如我们计算从1月1日的12:00 AM到1月6日的Jan 6 at 11:58 PM的结果是0,因为差了1分钟。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---------------------- |
|
||
| `a_now` | datetime | 日期时间类型,日期时间 |
|
||
| `athen` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `daysBetween(a_now, athen)`
|
||
|
||
得到参数ANow和参数AThen之间的相距的天数(自然日)。天数的计算同样舍掉了小数尾数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---------------------- |
|
||
| `a_now` | datetime | 日期时间类型,日期时间 |
|
||
| `athen` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `hoursBetween(a_now, athen)`
|
||
|
||
得到参数ANow和参数AThen之间的相距的小时数。小时数的计算同样舍掉了小数尾数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---------------------- |
|
||
| `a_now` | datetime | 日期时间类型,日期时间 |
|
||
| `athen` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `minutesBetween(a_now, athen)`
|
||
|
||
得到参数ANow和参数AThen之间的相距的分钟数。分钟数的计算同样舍掉了小数尾数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---------------------- |
|
||
| `a_now` | datetime | 日期时间类型,日期时间 |
|
||
| `athen` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `secondsBetween(a_now, athen)`
|
||
|
||
得到参数ANow和参数AThen之间的相距的秒数。秒数的计算同样舍掉了小数尾数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---------------------- |
|
||
| `a_now` | datetime | 日期时间类型,日期时间 |
|
||
| `athen` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `milliSecondsBetween(a_now, athen)`
|
||
|
||
得到参数ANow和参数AThen之间的相距的毫秒数,返回整数
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---------------------- |
|
||
| `a_now` | datetime | 日期时间类型,日期时间 |
|
||
| `athen` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `yearSpan(a_now, athen)`
|
||
|
||
得到参数ANow和参数AThen之间的相距的年数。由于年份不具有相同的长度,例如闰年比非闰年长一天,所以函数的计算是基于一个每年有365.25天的假设进行。 与YearsBetween函数不同,YearSpan的计算包含了小数部分。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---------------------- |
|
||
| `a_now` | datetime | 日期时间类型,日期时间 |
|
||
| `athen` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:float
|
||
|
||
### `monthSpan(a_now, athen)`
|
||
|
||
得到参数ANow和参数AThen之间的相距的月数。由于月份不具有相同的长度,所以函数的计算是基于一个每月有30.4375天的假设进行。 与MonthsBetween函数不同,MonthSpan的计算包含了小数部分。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---------------------- |
|
||
| `a_now` | datetime | 日期时间类型,日期时间 |
|
||
| `athen` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:float
|
||
|
||
### `weekSpan(a_now, athen)`
|
||
|
||
得到参数ANow和参数AThen之间的相距的周数 与WeekBetween函数不同,WeekSpan的计算包含了小数部分。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---------------------- |
|
||
| `a_now` | datetime | 日期时间类型,日期时间 |
|
||
| `athen` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:float
|
||
|
||
### `daySpan(a_now, athen)`
|
||
|
||
得到参数ANow和参数AThen之间的相距的天数。 与DayBetween函数不同,DaySpan的计算包含了小数部分。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---------------------- |
|
||
| `a_now` | datetime | 日期时间类型,日期时间 |
|
||
| `athen` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:float
|
||
|
||
### `hourSpan(a_now, athen)`
|
||
|
||
得到参数ANow和参数AThen之间的相距的小时数 与HourBetween函数不同,HourSpan的计算包含了小数部分。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---------------------- |
|
||
| `a_now` | datetime | 日期时间类型,日期时间 |
|
||
| `athen` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:float
|
||
|
||
### `minuteSpan(a_now, athen)`
|
||
|
||
得到参数ANow和参数AThen之间的相距的分钟数 与MinuteBetween函数不同,MinuteSpan的计算包含了小数部分。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---------------------- |
|
||
| `a_now` | datetime | 日期时间类型,日期时间 |
|
||
| `athen` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:float
|
||
|
||
### `secondSpan(a_now, athen)`
|
||
|
||
得到参数ANow和参数AThen之间的相距的秒数 与SecondBetween函数不同,SecondSpan的计算包含了小数部分。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | -------- | ---------------------- |
|
||
| `a_now` | datetime | 日期时间类型,日期时间 |
|
||
| `athen` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:float
|
||
|
||
### `incYear(a_value, a_number_of_years)`
|
||
|
||
得到自参数AValue指定的时间向后推移AnumberOfYears年的时间,参数AnumberOfYears也可以为负值,表示向前推移。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------------- | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
| `a_number_of_years` | any | 整数,表示年数 |
|
||
|
||
返回:datetime
|
||
|
||
### `incMonth(date_time, number_of_months)`
|
||
|
||
返回参数指定的时间DateTime之后NumberOfMonths个月的时间。参数NumberOfMonths也可以为负值,表示向前推移
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------------ | -------- | ---------------------- |
|
||
| `date_time` | datetime | 日期时间类型,日期时间 |
|
||
| `number_of_months` | any | 整数,月数 |
|
||
|
||
返回:datetime
|
||
|
||
### `incWeek(a_value, a_number_of_weeks)`
|
||
|
||
得到自参数AValue指定的时间向后推移AnumberOfWeeks周的时间,参数AnumberOfWeeks也可以为负值,表示向前推移。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------------- | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
| `a_number_of_weeks` | any | 整数,表示周数 |
|
||
|
||
返回:datetime
|
||
|
||
### `incDay(a_value, a_number_of_days)`
|
||
|
||
得到自参数AValue指定的时间向后推移AnumberOfDays天的时间(自然日),参数AnumberOfDays也可以为负值,表示向前推移。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------------ | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
| `a_number_of_days` | any | 整数,表示天数 |
|
||
|
||
返回:datetime
|
||
|
||
### `incHour(a_value, a_number_of_hours)`
|
||
|
||
得到自参数AValue指定的时间向后推移AnumberOfHours小时的时间,参数也可以为负值,表示向前推移。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------------- | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
| `a_number_of_hours` | any | 整数,表示小时数 |
|
||
|
||
返回:datetime
|
||
|
||
### `incMinute(a_value, a_number_of_minutes)`
|
||
|
||
得到自参数AValue指定的时间向后推移AnumberOfMinutes分钟的时间,参数ANumberOfMinutes也可以为负值,表示向前推移。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------------------- | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
| `a_number_of_minutes` | any | 整数,表示分钟数 |
|
||
|
||
返回:datetime
|
||
|
||
### `incSecond(a_value, a_number_of_seconds)`
|
||
|
||
得到自参数AValue指定的时间向后推移AnumberOfSeconds秒的时间,参数AnumberOfSecond也可以为负值,表示向前推移。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------------------- | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
| `a_number_of_seconds` | any | 整数,表示秒数 |
|
||
|
||
返回:datetime
|
||
|
||
### `incMilliSecond(a_value, a_number_of_milli_seconds)`
|
||
|
||
得到自参数AValue指定的时间向后推移AnumberOfMilliSeconds毫秒的时间,参数AnumberOfMilliSeconds也可以为负值,表示向前推移。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------------------------- | -------- | ----------------------- |
|
||
| `a_value` | datetime | TDateTime类型,日期时间 |
|
||
| `a_number_of_milli_seconds` | any | 整数,表示毫秒数 |
|
||
|
||
返回:datetime
|
||
|
||
### `encodeDateTime(a_year, a_month, a_day, a_hour, aminute, asecond, amilli_second)`
|
||
|
||
根据给定的参数AYear, AMonth, ADay, AHour, AMinute, ASecond, AmilliSecond分别作为年、月、日、小时、分钟、秒、毫秒组成一个日期时间型数据返回
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------------- | -------- | ------------------------------------------------------------------------ |
|
||
| `a_year` | any | 整数,年,年,定义域\[1,9999\] |
|
||
| `a_month` | any | 整数,月,月,定义域\[1,12\] |
|
||
| `a_day` | datetime | 整数,日,日期,定义域\[1,31\] |
|
||
| `a_hour` | any | 整数,小时,小时,定义域\[0,24\],如果是24,则要求分钟、秒、毫秒全部为0 |
|
||
| `aminute` | any | 整数,分钟,定义域\[0,59\] |
|
||
| `asecond` | any | 整数,秒,定义域\[0,59\] |
|
||
| `amilli_second` | any | 整数,毫秒,定义域\[0,999\] |
|
||
|
||
返回:datetime
|
||
|
||
### `decodeDateTime(a_value, a_year, a_month, a_day, a_hour, aminute, asecond, amilli_second)`
|
||
|
||
过程,将给定TDateTime类型的参数AValue分解为年、月、日、小时、分钟、秒、毫秒分别存到参数AYear, AMonth, ADay, AHour, AMinute, ASecond, AmilliSecond中。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------------- | -------- | ------------------------------------ |
|
||
| `a_value` | any | 日期时间类型,日期时间 |
|
||
| `a_year` | any | 整数,年,定义域\[1,9999\],返回值 |
|
||
| `a_month` | any | 整数,月,定义域\[1,12\],返回值 |
|
||
| `a_day` | datetime | 整数,日,定义域\[1,31\],返回值 |
|
||
| `a_hour` | any | 整数,小时,定义域\[0,24\],返回值 |
|
||
| `aminute` | any | 整数,分钟,定义域\[0,59\],返回值 |
|
||
| `asecond` | any | 整数,秒,定义域\[0,59\],返回值 |
|
||
| `amilli_second` | any | 整数,毫秒,定义域\[0,999\],返回值 |
|
||
|
||
返回:array
|
||
|
||
### `encodeDateWeek(a_year, aweek_of_year, aday_of_week)`
|
||
|
||
根据给定的参数AValue年份,以及给定在此年份的第AWeekOfYear周,以及给定的此周的第ADayOfWeek天来确定的,时间部分置0。 注意,AweekOfYear是依据ISO8601标准确定的。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------------- | ---- | -------------------------------------------------- |
|
||
| `a_year` | any | 整数,年,定义域\[1,9999\] |
|
||
| `aweek_of_year` | any | 整数,周,定义域\[1,53\] |
|
||
| `aday_of_week` | any | 整数,定义域\[1,7\],并小于当周属于当年的最大天数 |
|
||
|
||
返回:datetime
|
||
|
||
### `decodeDateWeek(a_value, a_year, aweek_of_year, aday_of_week)`
|
||
|
||
过程,根据一个TDateTime类型的时间,分别分解为年份,周数(属于当年第几周),天数(当周的第几天),并分别存在参数AYear, AWeekOfYear, AdayOfWeek中。 注意,AweekOfYear是依据ISO8601标准确定的
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------------- | ---- | ------------------------------ |
|
||
| `a_value` | any | 日期时间类型,日期时间 |
|
||
| `a_year` | any | 整数,年,返回值 |
|
||
| `aweek_of_year` | any | 整数,月,返回值 |
|
||
| `aday_of_week` | any | 整数,表示当周的第几天,返回值 |
|
||
|
||
返回:array
|
||
|
||
### `decodeDateDay(a_value, a_year, a_day_of_year)`
|
||
|
||
过程,根据参数AValue的时间确定所属的年份以及在当年第多少天,并把分别存到参数AYear, AdayOfYear中
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------------- | ---- | ------------------ |
|
||
| `a_value` | any | 日期时间类型 |
|
||
| `a_year` | any | 整数,年份,返回值 |
|
||
| `a_day_of_year` | any | 整数,天数,返回值 |
|
||
|
||
返回:array
|
||
|
||
### `encodeDateMonthWeek(a_year, a_month, aweek_of_month, aday_of_week)`
|
||
|
||
根据给定参数AYear, AMonth分别作为年、月,AWeekOfMonth作为当月的第几周,AdayOfWeek作为当周的第几天组成一个日期类型值返回,时间部分置0,组成日期返回。 注意,AWeekOfMonth是依据ISO8601标准确定的
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---------------- | ---- | --------------------------- |
|
||
| `a_year` | any | 整数,年,定义域\[1,9999\] |
|
||
| `a_month` | any | 整数,月,定义域\[1,12\] |
|
||
| `aweek_of_month` | any | 整数,当月的第几周 |
|
||
| `aday_of_week` | any | 整数,当周的第几天 |
|
||
|
||
返回:datetime
|
||
|
||
### `decodeDateMonthWeek(a_value, a_year, a_month, aweek_of_month, aday_of_week)`
|
||
|
||
根据给定的参数根据参数AValue的时间确定所属的年份、月份以及当月第多少周,当周第多少天,并把分别存到参数Ayear、Amonth、AweekOfMonth、ADayOfWeek中。 注意,AWeekOfMonth是依据ISO8601标准确定的
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---------------- | ---- | ----------------------------------- |
|
||
| `a_value` | any | 日期类型,分解的日期 |
|
||
| `a_year` | any | 整数,年,定义域\[1,9999\],返回值 |
|
||
| `a_month` | any | 整数,月,定义域\[1,12\],返回值 |
|
||
| `aweek_of_month` | any | 整数,当月的第几周,返回值 |
|
||
| `aday_of_week` | any | 整数,当周的第几天,返回值 |
|
||
|
||
返回:array
|
||
|
||
### `tryEncodeDateTime(a_year, a_month, a_day, a_hour, aminute, asecond, amilli_second, a_value)`
|
||
|
||
根据给定的参数AYear, AMonth, ADay, AHour, AMinute, ASecond, AmilliSecond分别作为年、月、日、小时、分钟、秒、毫秒组成一个日期时间型变量存到参数AValue中,并返回一个布尔型真假值,表示是否是个有效的日期
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------------- | -------- | ------------------------------------------------------------------ |
|
||
| `a_year` | any | 整数,年,定义域\[1,9999\] |
|
||
| `a_month` | any | 整数,月,定义域\[1,12\] |
|
||
| `a_day` | datetime | 整数,日,定义域\[1,31\] |
|
||
| `a_hour` | any | 整数,小时,定义域\[0,24\],如果是24,则要求分钟、秒、毫秒全部为0 |
|
||
| `aminute` | any | 整数,分钟,定义域\[0,59\] |
|
||
| `asecond` | any | 整数,秒,定义域\[0,59\] |
|
||
| `amilli_second` | any | 整数,毫秒,定义域\[0,999\] |
|
||
| `a_value` | datetime | 日期时间类型,组成的日期,返回值 |
|
||
|
||
返回:bool|datetime
|
||
|
||
### `tryEncodeDateWeek(a_year, a_week_of_year, a_value, aday_of_week)`
|
||
|
||
根据给定的参数AYear年份、此年份的第AWeekOfYear周,以及给定的此周的第ADayOfWeek天来确定的一个日期类型的值存到参数AValue中,时间部分置0。返回布尔值,表示是否是个有效的日期 注意:AweekOfYear和ADayOfWeek是依据ISO8601标准确定的
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---------------- | -------- | -------------------------------------------------- |
|
||
| `a_year` | any | 整数,年,定义域\[1,9999\] |
|
||
| `a_week_of_year` | any | 整数,周数,定义域\[1,53\] |
|
||
| `a_value` | datetime | 日期类型,返回值 |
|
||
| `aday_of_week` | any | 整数,定义域\[1,7\],并小于当周属于当年的最大天数 |
|
||
|
||
返回:bool|datetime
|
||
|
||
### `tryEncodeDateDay(a_year, a_day_of_year, a_value)`
|
||
|
||
过程,根据给定的参数AYear年份、以及指定在给定年份的第ADayofYear天来生成一个日期并存到参数AValue中,时间部分置0。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------------- | -------- | ------------------ |
|
||
| `a_year` | any | 整数,年份, |
|
||
| `a_day_of_year` | any | 整数,当年的第几天 |
|
||
| `a_value` | datetime | 日期类型,返回值 |
|
||
|
||
返回:bool|datetime
|
||
|
||
### `tryEncodeDateMonthWeek(a_year, a_month, aweek_of_month, aday_of_week, a_value)`
|
||
|
||
根据参数指定的年份AYear、月份Amonth、以及当月的第几周数AweekOfMonth和当周的第几天ADayOfWeek确定出一个日期型值存到参数AValue中。函数返回一个布尔型真假值,以表明日期是否有效转化 注意:AweekOfYear和ADayOfWeek是依据ISO8601标准确定的
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---------------- | -------- | --------------------------- |
|
||
| `a_year` | any | 整数,年,定义域\[1,9999\] |
|
||
| `a_month` | any | 整数,月,定义域\[1,12\] |
|
||
| `aweek_of_month` | any | 整数,当月的第几周 |
|
||
| `aday_of_week` | any | 整数,当周的第几天 |
|
||
| `a_value` | datetime | 日期类型,组成的日期 |
|
||
|
||
返回:bool|datetime|void
|
||
|
||
### `recodeYear(a_value, a_year)`
|
||
|
||
将参数Ayear指定的年份替换掉参数 AValue中的相应的年份信息,得到的日期类型返回 注意,如果出现用平年的年份替换闰年2月29日的年份信息,函数将报错。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | -------------- |
|
||
| `a_value` | datetime | 日期类型,日期 |
|
||
| `a_year` | any | 整数,年份 |
|
||
|
||
返回:datetime
|
||
|
||
### `recodeMonth(a_value, a_month)`
|
||
|
||
将参数AMonth指定的月份替换掉参数 AValue中的相应的月份信息,得到的TDateTime类型返回。 注意,如果出现替换月份后组成的日期为无效日期,函数将报错。如用4月替换3月31日的月份信息。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | -------------- |
|
||
| `a_value` | datetime | 日期类型,日期 |
|
||
| `a_month` | any | 整数,月份 |
|
||
|
||
返回:datetime
|
||
|
||
### `recodeDay(a_value, a_day)`
|
||
|
||
将参数ADay指定的日期(1至31)替换掉参数AValue中的相应的日期信息,得到的日期类型返回。 注意,如果出现替换日期信息后组成的日期为无效日期,函数将报错。如用30日替换2月28日的日期信息
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | --------------------------- |
|
||
| `a_value` | datetime | 日期类型,日期 |
|
||
| `a_day` | datetime | 整数,日期,定义域\[1,31\] |
|
||
|
||
返回:datetime
|
||
|
||
### `recodeHour(a_value, a_hour)`
|
||
|
||
将参数AHour指定的小时(0至24)替换掉参数AValue中的相应的日期信息,得到的日期时间返回。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | --------------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
| `a_hour` | any | 整数,小时,定义域\[0,24\] |
|
||
|
||
返回:datetime
|
||
|
||
### `recodeMinute(a_value, a_minute)`
|
||
|
||
将参数AMinute指定的分钟(0至59)替换掉参数AValue中的相应的分钟信息,得到的日期时间类型返回
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---------- | -------- | --------------------------- |
|
||
| `a_value` | datetime | 日期时间类型 |
|
||
| `a_minute` | any | 整数,分钟,定义域\[0,59\] |
|
||
|
||
返回:datetime
|
||
|
||
### `recodeMilliSecond(a_value, a_milli_second)`
|
||
|
||
将参数ASecond指定的毫秒数(0至999)替换掉参数AValue中的相应的毫秒数信息,得到的日期时间类型返回
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---------------- | -------- | ------------------------------ |
|
||
| `a_value` | datetime | :日期时间类型 |
|
||
| `a_milli_second` | any | 整数,毫秒数,定义域\[0,999\] |
|
||
|
||
返回:datetime
|
||
|
||
### `recodeDate(a_value, a_year, a_month, a_day)`
|
||
|
||
将参数Ayear、Amonth、Aday分别指定年份、月份、日期替换掉参数AValue中的相应的年份、月份、日期信息,保留时间信息,得到的日期时间类型返回
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ---------------------------------------------------------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
| `a_year` | any | 整数,年份,定义域\[0,9999\] |
|
||
| `a_month` | any | 整数,月份,定义域\[0,12\] |
|
||
| `a_day` | datetime | 整数,日期,定义域\[0,31\],并且要使Ayear、Amonth、Aday组成的时间有效 |
|
||
|
||
返回:datetime
|
||
|
||
### `recodeTime(a_value, a_hour, a_minute, a_second, amilli_second)`
|
||
|
||
将参数Ayear、Amonth、Aday、AHour、AMinute、Asecond、AMilliSecond分别指定小时、分钟、秒钟、毫秒替换掉参数AValue中的相应的小时、分钟、秒钟、毫秒信息,保留日期信息,得到的日期时间类型返回
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------------- | -------- | ---------------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
| `a_hour` | any | 整数,小时,定义域\[0,24\] |
|
||
| `a_minute` | any | 整数,分钟,定义域\[0,59\] |
|
||
| `a_second` | any | 整数,秒钟,定义域\[0,59\] |
|
||
| `amilli_second` | any | 整数,毫秒,定义域\[0,999\] |
|
||
|
||
返回:datetime
|
||
|
||
### `recodeDateTime(a_value, a_year, a_month, a_day, a_hour, a_minute, a_second, amilli_second)`
|
||
|
||
将参数Ayear、Amonth、Aday、AHour、AMinute、Asecond、AMilliSecond分别指定年份、月份、日期、小时、分钟、秒钟、毫秒替换掉参数AValue中的相应的年份、月份、日期、小时、分钟、秒钟、毫秒信息。对于不改变的变量,可以设置为65535(最大的WORD类型值),来告诉函数此参数对应的响应时间部分不需替换。函数得到的TDateTime类型返回
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------------- | -------- | ---------------------------------------------------------------------- |
|
||
| `a_value` | datetime | 日期时间类型,被替换的日期时间 |
|
||
| `a_year` | any | 整数,年份,定义域\[0,9999\] |
|
||
| `a_month` | any | 整数,月份,定义域\[0,12\] |
|
||
| `a_day` | datetime | 整数,日期,定义域\[0,12\],并且要使Ayear、Amonth、Aday组成的时间有效 |
|
||
| `a_hour` | any | 整数,小时,定义域\[0,24\] |
|
||
| `a_minute` | any | 整数,分钟,定义域\[0,59\] |
|
||
| `a_second` | any | 整数,秒钟,定义域\[0,59\] |
|
||
| `amilli_second` | any | 整数,毫秒,定义域\[0,999\] |
|
||
|
||
返回:datetime
|
||
|
||
### `tryRecodeDateTime(a_value, a_year, a_month, a_day, a_hour, a_minute, a_second, amilli_second, aresult)`
|
||
|
||
本函数同RecodeDateTime函数非常类似。将参数Ayear、Amonth、Aday、 AHour、AMinute、Asecond、AMilliSecond分别指定年份、月份、日期、小时、分钟、秒钟、毫秒替换掉参数AValue中的相应的年份、月份、日期、小时、分钟、秒钟、毫秒信息,并将新的TDateTime类型时间存到参数Aresult中。对于不需改变的变量,可以设置为65535(最大的WORD类型值),来告诉函数此参数对应的响应时间部分不需替换 如果给定的时间有效且生成的新时间有效,函数返回真,否则返回假
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------------- | -------- | ---------------------------------------------------------------------- |
|
||
| `a_value` | datetime | 日期时间类型,被替换的日期时间 |
|
||
| `a_year` | any | 整数,年份,定义域\[0,9999\] |
|
||
| `a_month` | any | 整数,月份,定义域\[0,12\] |
|
||
| `a_day` | datetime | 整数,日期,定义域\[0,12\],并且要使Ayear、Amonth、Aday组成的时间有效 |
|
||
| `a_hour` | any | 整数,小时,定义域\[0,24\] |
|
||
| `a_minute` | any | 整数,分钟,定义域\[0,59\] |
|
||
| `a_second` | any | 整数,秒钟,定义域\[0,59\] |
|
||
| `amilli_second` | any | 整数,毫秒,定义域\[0,999\] |
|
||
| `aresult` | datetime | 日期时间类型,替换后的日期时间 |
|
||
|
||
返回:bool|datetime
|
||
|
||
### `compareDateTime(a, b)`
|
||
|
||
比较时间A和时间B的大小,返回它们的关系 如果时间A比时间B早,返回-1 如果时间A比时间B晚,返回+1 如果时间A与时间B相同,返回0
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | -------- | ---------------------- |
|
||
| `a` | datetime | 日期时间类型,日期时间 |
|
||
| `b` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `sameDateTime(a, b)`
|
||
|
||
判断时间A和时间B是否相等。 注意:有可能两个TDateTime从数字上看是不相等的,但是他们实际代表同一时间,例如在微秒极的小数是没有意义的。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | -------- | ---------------------- |
|
||
| `a` | datetime | 日期时间类型,日期时间 |
|
||
| `b` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:bool
|
||
|
||
### `compareDate(a, b)`
|
||
|
||
比较时间A所属的日期和时间B所属的日期的大小,返回它们的关系 如果A的日期比B的日期早,返回-1 如果A的日期比B的日期晚,返回+1 如果A的日期与B的日期相同,返回0
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | -------- | ---------------------- |
|
||
| `a` | datetime | 日期时间类型,日期时间 |
|
||
| `b` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `sameDate(a, b)`
|
||
|
||
返回布尔型真假值,判断时间A所属的日期和时间B所属的日期是否是同一天,如果是同一天,返回真,否则返回假。 注意,该函数只对比日期部分,对于小数部分信息不比较。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | -------- | ---------------------- |
|
||
| `a` | datetime | 日期时间类型,日期时间 |
|
||
| `b` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:bool
|
||
|
||
### `compareTime(a, b)`
|
||
|
||
比较A和B的时间部分(不考虑日期部分),返回它们的关系 如果A的时间比B的时间早,返回-1 如果A的时间比B的时间晚,返回+1 如果A的时间与B的时间相同,返回0
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | -------- | ---------------------- |
|
||
| `a` | datetime | 日期时间类型,日期时间 |
|
||
| `b` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `sameTime(a, b)`
|
||
|
||
判断A和B的时间部分是否相等(不考虑日期部分),如果相等,返回真,否则返回假。 注意:有可能两个TDateTime从数字上看是不相等的,但是他们实际代表同一时间,例如在微秒极的小数是没有意义的。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | -------- | ---------------------- |
|
||
| `a` | datetime | 日期时间类型,日期时间 |
|
||
| `b` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:bool
|
||
|
||
### `nthDayOfWeek(a_value)`
|
||
|
||
返回参数AValue指定的日期在当月是第几周,注意,这里的周是代表7天,就是第几个7天。因此,每月的1至7日返回1,8至14日返回2,15至21日返回3,以此类推。 注意:与WeekOfTheMonth函数不同,WeekOfTheMonth使用了ISO8601标准,这意味着只有一个周的四天以上属于某个月,才认定这周是属于这个月的。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ---------------------- |
|
||
| `a_value` | datetime | 日期时间类型,日期时间 |
|
||
|
||
返回:any
|
||
|
||
### `decodeDayOfWeekInMonth(a_value, a_year, a_month, anth_day_of_week, aday_of_week)`
|
||
|
||
过程,根据参数AValue指定的日期得到年份Ayear、月份AMonth、周数AnthDayOfWeek、当周天数AdayOfWeek 注意,这里的周是代表7天,就是第几个7天。因此,每月的1至7日返回1,8至14日返回2,15至21日返回3,以此类推。 与WeekOfTheMonth函数不同,WeekOfTheMonth使用了ISO8601标准,这意味着只有一个周的四天以上属于某个月,才认定这周是属于这个月的。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------------ | -------- | ---------------- |
|
||
| `a_value` | datetime | 日期时间类型 |
|
||
| `a_year` | any | 整数,年,年份 |
|
||
| `a_month` | any | 整数,月,月份 |
|
||
| `anth_day_of_week` | any | 整数,周数 |
|
||
| `aday_of_week` | any | 整数,当周第几天 |
|
||
|
||
返回:any
|
||
|
||
### `encodeDayOfWeekInMonth(a_year, a_month, anth_day_of_week, aday_of_week)`
|
||
|
||
根据参数指定的年份Ayear、月份AMonth、周数AnthDayOfWeek、当周天数AdayOfWeek得到一个TDateTime类型值,时间部分置0 注意,这里的周是必须是完整周,即从周一开始都属于本月的,才能算1周。 与WeekOfTheMonth函数不同,WeekOfTheMonth使用了ISO8601标准,这意味着当一个周的四天以上属于某个月,即认定这周是属于这个月的。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------------ | ---- | ----------------------------- |
|
||
| `a_year` | any | 整数,年份,定义域\[0,9999\] |
|
||
| `a_month` | any | 整数,月份,定义域\[0,12\] |
|
||
| `anth_day_of_week` | any | 整数,周数 |
|
||
| `aday_of_week` | any | 整数,当周第几天 |
|
||
|
||
返回:datetime
|
||
|
||
### `tryEncodeDayOfWeekInMonth(a_year, a_month, anth_day_of_week, aday_of_week, a_value)`
|
||
|
||
跟EncodeDayOfWeekInMonth函数非常类似。根据参数指定的年份Ayear、月份AMonth、周数AnthDayOfWeek、当周天数AdayOfWeek得到一个TDateTime类型值,存到参数AValue中,时间部分置0。函数返回一个真假值,如果给定的参数能够得到合法的日期就返回真,否则返回假 注意,这里的周是必须是完整周,即从周一开始都属于本月的,才能算1周。 与WeekOfTheMonth函数不同,WeekOfTheMonth使用了ISO8601标准,这意味着只要一个周的四天以上属于某个月,即认定这周是属于这个月的。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------------ | -------- | ----------------------------- |
|
||
| `a_year` | any | 整数,年份,定义域\[0,9999\] |
|
||
| `a_month` | any | 整数,月份,定义域\[0,12\] |
|
||
| `anth_day_of_week` | any | 整数,周数 |
|
||
| `aday_of_week` | any | 整数,当周第几天 |
|
||
| `a_value` | datetime | 日期类型,组成的日期,返回值 |
|
||
|
||
返回:bool|datetime|void
|
||
|
||
### `dateTimeToJulianDate(a_value)`
|
||
|
||
将TDateTime类型的参数转换成儒略日类型。儒略日类型类型是自从格林威治公元前4713年1月一日中午到计时点的天数,包括小数。这种时间用在天文学,地球物理学等需要精确时间的地方
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ------------- |
|
||
| `a_value` | datetime | TDateTime类型 |
|
||
|
||
返回:float
|
||
|
||
### `julianDateToDateTime(a_value)`
|
||
|
||
将儒略日类型的时间转换成TDateTime类型的时间。儒略日类型类型是自从格林威治公元前4713年1月一日中午到计时点的天数,包括小数。这种时间用在天文学,地球物理学等需要精确时间的地方
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ----- | -------------------------- |
|
||
| `a_value` | float | 实数,代表儒略日类型的时间 |
|
||
|
||
返回:datetime
|
||
|
||
### `tryJulianDateToDateTime(a_value, a_date_time)`
|
||
|
||
将儒略日类型的时间转换成TDateTime类型的时间并存到参数AdateTime中。函数返回布尔型真假值,表示是否可以转换成功 儒略日类型类型是自从格林威治公元前4713年1月一日中午到计时点的天数,包括小数。这种时间用在天文学,地球物理学等需要精确时间的地方
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------- | -------- | ---------------------------------------- |
|
||
| `a_value` | float | 实数,代表儒略日类型的时间 |
|
||
| `a_date_time` | datetime | 日期时间类型,转化成功的日期时间,返回值 |
|
||
|
||
返回:bool
|
||
|
||
### `dateTimeToModifiedJulianDate(a_value)`
|
||
|
||
将TDateTime类型的参数转换成新儒略日类型。新儒略日类型类型是在儒略日类型上改进的,计时发法是自从格林威治1958年11月17日午夜到计时点的天数,包括小数
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ------------ |
|
||
| `a_value` | datetime | 日期时间类型 |
|
||
|
||
返回:float
|
||
|
||
### `modifiedJulianDateToDateTime(a_value)`
|
||
|
||
将新儒略日类型的参数AValue转换成TDateTime类型的。新儒略日类型类型是在儒略日类型上改进的,计时发法是自从格林威治1958年11月17日午夜到计时点的天数,包括小数
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ----- | ---------------------------- |
|
||
| `a_value` | float | 实数,表示新儒略日类型的时间 |
|
||
|
||
返回:datetime
|
||
|
||
### `tryModifiedJulianDateToDateTime(a_value, a_date_time)`
|
||
|
||
与ModifiedJulianDateToDateTime函数非常类似,将新儒略日类型的参数AValue转换成TDateTime类型的值存到参数AdateTime中。函数返回布尔型真假值,表示是否转换成功 新儒略日类型类型是在儒略日类型上改进的,计时发法是自从格林威治1958年11月17日午夜到计时点的天数,包括小数
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------------- | -------- | ------------------------------ |
|
||
| `a_value` | float | 实数,表示新儒略日类型的时间 |
|
||
| `a_date_time` | datetime | 日期时间类型,日期时间,返回值 |
|
||
|
||
返回:bool
|
||
|
||
### `dateTimeToUnix(a_value)`
|
||
|
||
将TDateTime类型的参数转换成UNIX操作系统的相应时间类型。UNIX操作系统的表示时间的格式是以自1970年1月1日午夜0:00到计时点的秒数
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | -------- | ------------ |
|
||
| `a_value` | datetime | 日期时间类型 |
|
||
|
||
返回:any
|
||
|
||
### `unixToDateTime(a_value)`
|
||
|
||
将以UNIX操作系统的相应时间类型的参数AValue转换成TDateTime类型数。UNIX操作系统的表示时间的格式是以自1970年1月1日午夜0:00到计时点的秒数
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ---- | -------------------------------- |
|
||
| `a_value` | any | 整数,UNIX操作系统的相应时间类型 |
|
||
|
||
返回:datetime
|
||
|
||
### `fileDateToDateTime(file_date)`
|
||
|
||
文件时间对标准的时间格式的转换。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----------- | -------- | ---------------- |
|
||
| `file_date` | datetime | 整数,文件时间。 |
|
||
|
||
返回:datetime
|
||
|
||
### `dateTimeToFileDate(date_time)`
|
||
|
||
标准时间格式转换成文件的时间格式。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----------- | -------- | ------------ |
|
||
| `date_time` | datetime | 日期时间类型 |
|
||
|
||
返回:datetime
|
||
|
||
### `dateTimeGmtToCookieStrw(date)`
|
||
|
||
将日期时间(GMT时间)转为Cookie格式宽字节字符串Fri, 13-Jun-2008 23:01:56 GMT。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | -------- | ---------------------------- |
|
||
| `date` | datetime | 日期时间类型,用于转换的时间 |
|
||
|
||
返回:string
|
||
|
||
### `dateTimeGmtToHttpStrw(date)`
|
||
|
||
将日期时间(GMT时间)转为HTTP格式宽字节字符串Fri, 13 Jun 2008 23:01:56 GMT。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | -------- | ---------------------------- |
|
||
| `date` | datetime | 日期时间类型,用于转换的时间 |
|
||
|
||
返回:string
|
||
|
||
### `dateTimeToInternetStrw(date, to_gmt)`
|
||
|
||
将日期转为Internet格式宽字节字符串Friday, 13Jun2008 22:27:04 +0800,当ToGMT为真时,采用GMT时间格式。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| -------- | -------- | ---------------------------- |
|
||
| `date` | datetime | 日期时间类型,用于转换的时间 |
|
||
| `to_gmt` | bool | object |
|
||
|
||
返回:string
|
||
|
||
### `dateTimeToStrw(date_time)`
|
||
|
||
将TDateTime类型的参数DateTime的日期和时间转换成宽字节字符串,格式是短日期加长时间格式
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----------- | -------- | ----------------------- |
|
||
| `date_time` | datetime | TDateTime类型,日期时间 |
|
||
|
||
返回:string
|
||
|
||
### `timeToStrw(date_time)`
|
||
|
||
将TDateTime类型的参数DateTime的时间部分转换成宽字节字符串,格式是长时间格式
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----------- | -------- | ----------------------- |
|
||
| `date_time` | datetime | TDateTime类型,日期时间 |
|
||
|
||
返回:string
|
||
|
||
### `dateToStrw(date_time)`
|
||
|
||
将TDateTime类型的参数DateTime的日期部分转换成宽字节字符串,格式是短日期格式
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----------- | -------- | ----------------------- |
|
||
| `date_time` | datetime | TDateTime类型,日期时间 |
|
||
|
||
返回:string
|
||
|
||
### `array2Str(value, aps)`
|
||
|
||
将数组value转换成一个用aps作为分割符号的字符串,与str2Array函数相反。 主要支持数字下标数组,若是字符串下标,转换后顺序可能发生变化。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ------ | ---------------------------------------------------------------------------- |
|
||
| `value` | array | 一维数组,需要组合成字符串数据的一维数组,可以是字符串数组,也可以是数字数组 |
|
||
| `aps` | string | 字符串,分割符,默认分割符为分号‘;’ |
|
||
|
||
返回:array
|
||
|
||
### `chr(value)`
|
||
|
||
返回ascii码的值为value的字符
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | 整数 |
|
||
|
||
返回:string
|
||
|
||
### `wideChr(value)`
|
||
|
||
返回unicode码的值为value的unicode字符
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---- |
|
||
| `value` | any | 整数 |
|
||
|
||
返回:string
|
||
|
||
### `setFormatLocalCode(code)`
|
||
|
||
设置Format等函数默认使用的地区区域码,每个区域都有默认的格式。-1为默认格式,0为当前系统所属地区码。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ------ | ---- |
|
||
| `code` | string | 整型 |
|
||
|
||
返回:any
|
||
|
||
### `pos(substr, s)`
|
||
|
||
子串位置,返回字符串Substr在字符串S中的位置,即S从第几个字母开始跟Substr的字符匹配,如果没有找到,就返回0。当参数类型不为字符串的时候不返回异常 注意,匹配对大小写敏感的。返回的位置从1开始计起。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| -------- | ------ | ---------------------------------- |
|
||
| `substr` | string | 字符串类型,需要查找的字符串,子串 |
|
||
| `s` | string | 字符串类型,源串 |
|
||
|
||
返回:string
|
||
|
||
### `str(x, s)`
|
||
|
||
将一个实数X转换成字符串,存到参数S中
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | -------------- |
|
||
| `x` | float | 实数 |
|
||
| `s` | string | 字符串,输出值 |
|
||
|
||
返回:string
|
||
|
||
### `intToHex(value, digits)`
|
||
|
||
返回整数Value转换成16进制格式的字符串,Digits为最小的数字个数,不足补0
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| -------- | ---- | ------------------ |
|
||
| `value` | any | 整数 |
|
||
| `digits` | any | 整数,最小数字个数 |
|
||
|
||
返回:string
|
||
|
||
### `boolToStr2(b)`
|
||
|
||
将布尔型转换成字符串类型并返回。如果B为真,函数返回'true',如果B为假,返回' False'。若想返回’-1’与’0’的结果可用BoolToStr实现。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ---- | ------ |
|
||
| `b` | bool | object |
|
||
|
||
返回:string
|
||
|
||
### `decodeSoundexInt(a_value)`
|
||
|
||
是SoundexInt函数的反函数,将表示发音的整数转成发音的字符串(SoundEx Codes)。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ---- | ------------------------ |
|
||
| `a_value` | any | 整数,表示发音特征的整数 |
|
||
|
||
返回:string
|
||
|
||
### `decodeSoundexWord(a_value)`
|
||
|
||
是SoundexWord函数的反函数,将表示发音的整数转成发音的字符串(SoundEx Codes)。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ---- | ------------------------ |
|
||
| `a_value` | any | 整数,表示发音特征的整数 |
|
||
|
||
返回:string
|
||
|
||
### `ansiPos(const, s)`
|
||
|
||
判断子串在字符串源串中的位置,从1开始计起,第1个即找到子串,则返回1。如果没有找到对应的子串,则返回0。其中,汉字占一个字符。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ------ | ------------ |
|
||
| `const` | any | 字符串,子串 |
|
||
| `s` | string | 字符串,源串 |
|
||
|
||
返回:string
|
||
|
||
### `strw(x, s)`
|
||
|
||
将一个实数X转换成科学记数法格式的宽字节字符串,存到参数S中
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ------ | -------------- |
|
||
| `x` | float | 实数 |
|
||
| `s` | string | 字符串,输出值 |
|
||
|
||
返回:string
|
||
|
||
### `intToHexw(value, digits)`
|
||
|
||
返回整数Value转换成16进制格式的宽字节字符串,Digits为最小的数字个数,不足补0。IntToHexw返回的是宽字节字符串。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| -------- | ---- | ------------------ |
|
||
| `value` | any | 整数 |
|
||
| `digits` | any | 整数,最小数字个数 |
|
||
|
||
返回:string
|
||
|
||
### `ifwstring(value, n)`
|
||
|
||
判断value是否是一个宽字节字符串类型(Unicode字符集)。与ifString的区别是,ifString判断是否是多字节字符类型。可通过可选参数N对数组中的行或元素进行判断。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ----- | -------------------------------- |
|
||
| `value` | float | 任意类型数值。 |
|
||
| `n` | any | 可选参数,整数。具体参考返回说明 |
|
||
|
||
返回:array
|
||
|
||
### `boolToStrw2(b)`
|
||
|
||
将布尔型转换成宽字节字符串类型并返回。与BoolToStr2的区别是,BoolToStr2返回的是多字节字符串,而BoolToStrw2返回的是宽字节字符串。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ---- | ------ |
|
||
| `b` | bool | object |
|
||
|
||
返回:string
|
||
|
||
### `boolToStrw(b)`
|
||
|
||
将布尔型转换成宽字节字符串类型并返回。与BoolToStr的区别是,BoolToStr返回的是多字节字符串,而BoolToStrw返回的是宽字节字符串。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ---- | ------ |
|
||
| `b` | bool | object |
|
||
|
||
返回:string
|
||
|
||
### `odd(x)`
|
||
|
||
判断X是否是奇数,如果是,返回真,否则返回假
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ---- | ------------------------------ |
|
||
| `x` | any | 整数,如果是实数,先取整数部分 |
|
||
|
||
返回:bool
|
||
|
||
### `abs(x)`
|
||
|
||
返回X的绝对值
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ---- |
|
||
| `x` | float | 实数 |
|
||
|
||
返回:float
|
||
|
||
### `ldexp(x, p)`
|
||
|
||
返回X\*(2p)
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | -------------- |
|
||
| `x` | float | 实数,作底 |
|
||
| `p` | any | 整数,作为指数 |
|
||
|
||
返回:float
|
||
|
||
### `_and(x, y)`
|
||
|
||
与,返回位运算二进制X And 二进制Y
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ---- | ---- |
|
||
| `x` | any | 整数 |
|
||
| `y` | any | 整数 |
|
||
|
||
返回:any
|
||
|
||
### `_or(x, y)`
|
||
|
||
或,返回位运算X Or Y
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ---- | ---- |
|
||
| `x` | any | 整数 |
|
||
| `y` | any | 整数 |
|
||
|
||
返回:any
|
||
|
||
### `_not(x)`
|
||
|
||
非,返回位运算Not X,把二进制x全部取反,即非0为1,非1为0。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ---- | ---- |
|
||
| `x` | any | 整数 |
|
||
|
||
返回:any
|
||
|
||
### `_xor(x, y)`
|
||
|
||
异或,返回位运算X Xor Y,
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ---- | ---- |
|
||
| `x` | any | 整数 |
|
||
| `y` | any | 整数 |
|
||
|
||
返回:any
|
||
|
||
### `_shl(x, y)`
|
||
|
||
左移位,返回位运算X Shl Y,二进制X左移 Y位
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ---- | ---- |
|
||
| `x` | any | 整数 |
|
||
| `y` | any | 整数 |
|
||
|
||
返回:any
|
||
|
||
### `_shr(x, y)`
|
||
|
||
右移位,返回位运算X Shr Y,二进制X右移 Y位
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ---- | ---- |
|
||
| `x` | any | 整数 |
|
||
| `y` | any | 整数 |
|
||
|
||
返回:any
|
||
|
||
### `_rol(x, y)`
|
||
|
||
循环左移位,返回位运算X Rol Y,二进制X各位左移Y位,原来的高Y位变成低Y位
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ---- | ---- |
|
||
| `x` | any | 整数 |
|
||
| `y` | any | 整数 |
|
||
|
||
返回:any
|
||
|
||
### `_ror(x, y)`
|
||
|
||
循环右移位,返回位运算X Ror Y
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ---- | ---- |
|
||
| `x` | any | 整数 |
|
||
| `y` | any | 整数 |
|
||
|
||
返回:any
|
||
|
||
### `sin(x)`
|
||
|
||
正弦函数
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ----------- |
|
||
| `x` | float | 弧度值,实数 |
|
||
|
||
返回:float
|
||
|
||
### `cos(x)`
|
||
|
||
余弦函数
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ------------ |
|
||
| `x` | float | 弧度值, 实数 |
|
||
|
||
返回:float
|
||
|
||
### `sinCos(x, sin, cos)`
|
||
|
||
计算X的正弦和余弦值,分别返回到参数Sin和Cos中
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----- | ----- | ------------------------ |
|
||
| `x` | float | 弧度值, 实数 |
|
||
| `sin` | any | 正弦计算结果存放于该参数 |
|
||
| `cos` | float | 余弦计算结果存放于该参数 |
|
||
|
||
返回:any
|
||
|
||
### `tan(x)`
|
||
|
||
正切函数
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ------------------------------------- |
|
||
| `x` | float | 弧度值,实数,X≠n\*π+π/2,(n是整数) |
|
||
|
||
返回:float
|
||
|
||
### `cot(x)`
|
||
|
||
余切函数,也就是返回1/Tan(X)的值
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | --------------------------------- |
|
||
| `x` | float | 弧度值,实数,X≠n\*π,(n是整数) |
|
||
|
||
返回:float
|
||
|
||
### `coTan(x)`
|
||
|
||
余切函数,也就是返回1/Tan(X)的值
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | --------------------------------- |
|
||
| `x` | float | 弧度值,实数,X≠n\*π,(n是整数) |
|
||
|
||
返回:float
|
||
|
||
### `sec(x)`
|
||
|
||
正割函数,返回参数X的正割值,也就是返回1/Cos(X)的值
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ------------ |
|
||
| `x` | float | 弧度值,实数 |
|
||
|
||
返回:float
|
||
|
||
### `csc(x)`
|
||
|
||
余割函数,返回参数X的余割值,也就是返回1/Sin(X)的值
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ------------ |
|
||
| `x` | float | 弧度值,实数 |
|
||
|
||
返回:float
|
||
|
||
### `secant(x)`
|
||
|
||
正割函数,返回参数X的正割值,也就是返回1/Cos(X)的值
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ------------ |
|
||
| `x` | float | 弧度值,实数 |
|
||
|
||
返回:float
|
||
|
||
### `cosecant(x)`
|
||
|
||
余割函数,返回参数X的余割值,也就是返回1/Sin(X)的值
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ------------ |
|
||
| `x` | float | 弧度值,实数 |
|
||
|
||
返回:float
|
||
|
||
### `arcSin(x)`
|
||
|
||
反正弦函数,返回弧度值(介于-π/2和π/2之间)
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | -------------------------------------- |
|
||
| `x` | float | Sin函数值,实数,定义域范围是\[-1,1\] |
|
||
|
||
返回:float
|
||
|
||
### `arcCos(x)`
|
||
|
||
反余弦函数,返回弧度值(介于0和π之间)
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | -------------------------------------- |
|
||
| `x` | float | Cos函数值,实数,定义域范围是\[-1,1\] |
|
||
|
||
返回:float
|
||
|
||
### `arcTan(x)`
|
||
|
||
反正切函数,返回值域是\[-π,π\]
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | --------------- |
|
||
| `x` | float | Tan函数值,实数 |
|
||
|
||
返回:float
|
||
|
||
### `arcTan2(x, y)`
|
||
|
||
反正切函数,求正切值等于Y/X的弧度值,\[-π,π\]
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ------------ |
|
||
| `x` | float | 对边长,实数 |
|
||
| `y` | float | 侧边长,实数 |
|
||
|
||
返回:float
|
||
|
||
### `arcCot(x)`
|
||
|
||
反余切函数,计算参数X的反余切值
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ---------------- |
|
||
| `x` | float | 余切函数值,实数 |
|
||
|
||
返回:float
|
||
|
||
### `arcSec(x)`
|
||
|
||
反正割函数
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ---------------- |
|
||
| `x` | float | 正割函数值,实数 |
|
||
|
||
返回:float
|
||
|
||
### `arcCsc(x)`
|
||
|
||
反余割函数
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ---------------- |
|
||
| `x` | float | 余割函数值,实数 |
|
||
|
||
返回:float
|
||
|
||
### `hypot(x, y)`
|
||
|
||
根据直角三角形的两条直角边返回斜边长度
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ---------------------- |
|
||
| `x` | float | 一条直角边长度,实数 |
|
||
| `y` | float | 另一条直角边长度,实数 |
|
||
|
||
返回:float
|
||
|
||
### `radToDeg(radians)`
|
||
|
||
将弧度值Radians转化为以角度为度量单位的相应值,也就是计算Radians\*180/π
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ----- | ------------ |
|
||
| `radians` | float | 弧度值,实数 |
|
||
|
||
返回:float
|
||
|
||
### `radToGrad(radians)`
|
||
|
||
将弧度值Radians转化为以梯度为度量单位的相应值,也就是计算Radians\*200/π
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ----- | ------------ |
|
||
| `radians` | float | 弧度值,实数 |
|
||
|
||
返回:float
|
||
|
||
### `radToCycle(radians)`
|
||
|
||
将弧度值Radians转化为以圆周为度量单位的相应值,也就是计算Radians\*/2π(2π是一个圆周)
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ----- | ------------ |
|
||
| `radians` | float | 弧度值,实数 |
|
||
|
||
返回:float
|
||
|
||
### `degToRad(degrees)`
|
||
|
||
将角度值Degrees转化为以弧度为度量单位的相应值,也就是计算Degrees\*π/180
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ----- | ------------ |
|
||
| `degrees` | float | 角度值,实数 |
|
||
|
||
返回:float
|
||
|
||
### `degToGrad(degrees)`
|
||
|
||
将角度值Degrees转化为以梯度为度量单位的相应值,也就是计算Degrees\*100/90(90度角相当于100梯度)
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ----- | ------------ |
|
||
| `degrees` | float | 角度值,实数 |
|
||
|
||
返回:float
|
||
|
||
### `degToCycle(degrees)`
|
||
|
||
将角度值Degrees转化为以圆周为度量单位的相应值,也就是计算Degrees\*/360
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ----- | ------------ |
|
||
| `degrees` | float | 角度值,实数 |
|
||
|
||
返回:array
|
||
|
||
### `gradToRad(grads)`
|
||
|
||
将梯度值Grads转化为以弧度为度量单位的相应值,也就是计算Grads\*π/200
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ----- | ------------ |
|
||
| `grads` | float | 梯度值,实数 |
|
||
|
||
返回:float
|
||
|
||
### `gradToDeg(grads)`
|
||
|
||
将梯度值Grads转化为以角度为度量单位的相应值,也就是计算Grads\*90/100
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ----- | ------------ |
|
||
| `grads` | float | 梯度值,实数 |
|
||
|
||
返回:float
|
||
|
||
### `gradToCycle(grads)`
|
||
|
||
将梯度值Grads转化为以圆周为度量单位的相应值,也就是计算Grads/400
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ----- | ------------ |
|
||
| `grads` | float | 梯度值,实数 |
|
||
|
||
返回:float
|
||
|
||
### `cycleToRad(cycles)`
|
||
|
||
将圆周值Cycles转化为以弧度为度量单位的相应值,也就是计算Cycles\*2\*π
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| -------- | ----- | ------------ |
|
||
| `cycles` | float | 圆周值,实数 |
|
||
|
||
返回:float
|
||
|
||
### `cycleToDeg(cycles)`
|
||
|
||
将圆周值Cycles转化为以角度为度量单位的相应值,也就是计算Cycles\*360
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| -------- | ----- | ------------ |
|
||
| `cycles` | float | 圆周值,实数 |
|
||
|
||
返回:float
|
||
|
||
### `cycleToGrad(cycles)`
|
||
|
||
将圆周值Cycles转化为以梯度为度量单位的相应值,也就是计算Cycles\*400
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| -------- | ----- | ------------ |
|
||
| `cycles` | float | 圆周值,实数 |
|
||
|
||
返回:float
|
||
|
||
### `sinh(x)`
|
||
|
||
双曲线正弦函数,返回参数X的双曲线正弦值,也就是(ex-e-x)/2
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ------------ |
|
||
| `x` | float | 弧度值,实数 |
|
||
|
||
返回:float
|
||
|
||
### `cosh(x)`
|
||
|
||
双曲余弦函数,返回参数X的双曲线余弦值,也就是(ex+e-x)/2
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ------------ |
|
||
| `x` | float | 弧度值,实数 |
|
||
|
||
返回:float
|
||
|
||
### `tanh(x)`
|
||
|
||
双曲线正切函数,返回参数X的双曲线正切值,也就是(ex-e-x)/(ex+e-x)
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ------------ |
|
||
| `x` | float | 弧度值,实数 |
|
||
|
||
返回:float
|
||
|
||
### `coth(x)`
|
||
|
||
双曲线余切函数,返回参数X的双曲线余切值,也就是(ex+e-x)/(ex-e-x)
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ------------ |
|
||
| `x` | float | 弧度值,实数 |
|
||
|
||
返回:float
|
||
|
||
### `sech(x)`
|
||
|
||
双曲线正割函数,计算参数X的双曲线正割值,也就是计算2/(ex+e-x)
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ------------ |
|
||
| `x` | float | 弧度值,实数 |
|
||
|
||
返回:float
|
||
|
||
### `csch(x)`
|
||
|
||
双曲线余割函数,计算参数X的双曲线余割值,也就是计算2/(ex-e-x)
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ------------ |
|
||
| `x` | float | 弧度值,实数 |
|
||
|
||
返回:float
|
||
|
||
### `arcCosh(x)`
|
||
|
||
反双曲余弦函数,计算参数X的反双曲余弦值,是双曲余弦函数Cosh(X)的反函数
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ---------------------- |
|
||
| `x` | float | 定义域是\[1,+∞), 实数 |
|
||
|
||
返回:float
|
||
|
||
### `arcSinh(x)`
|
||
|
||
反双曲正弦函数,计算参数X的反双曲正弦值,是双曲正弦函数Sinh(X)的反函数
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ---- |
|
||
| `x` | float | 实数 |
|
||
|
||
返回:float
|
||
|
||
### `arcTanh(x)`
|
||
|
||
反双曲正切函数,计算参数X的反双曲正切值,是双曲正切函数TanH(X)的反函数
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ------------------------ |
|
||
| `x` | float | 实数,定义域是\[-1,+1\] |
|
||
|
||
返回:float
|
||
|
||
### `arcCoth(x)`
|
||
|
||
反双曲余切函数,计算参数X的反双曲余切值,是双曲余切函数CotH(X)的反函数
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ---- |
|
||
| `x` | float | 实数 |
|
||
|
||
返回:float
|
||
|
||
### `arcSech(x)`
|
||
|
||
反双曲正割函数,计算参数X的反双曲正割值,是双曲正割函数CecH(X)的反函数
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ---- |
|
||
| `x` | float | 实数 |
|
||
|
||
返回:float
|
||
|
||
### `arcCsch(x)`
|
||
|
||
反双曲余割函数,计算参数X的反双曲余割值,是双曲余割函数Csch (X)的反函数
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ---- |
|
||
| `x` | float | 实数 |
|
||
|
||
返回:float
|
||
|
||
### `ln(x)`
|
||
|
||
返回X的自然对数,是Exp函数的反函数
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ----------- |
|
||
| `x` | float | 实数,大于0 |
|
||
|
||
返回:float
|
||
|
||
### `lnXp1(x)`
|
||
|
||
返回(X+1)的自然对数,也就是Ln(X+1)
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ------------------ |
|
||
| `x` | float | 可以是实数,大于-1 |
|
||
|
||
返回:float
|
||
|
||
### `log10(x)`
|
||
|
||
返回X以10为底的自然对数,也就是log10X
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ----------- |
|
||
| `x` | float | 实数,大于0 |
|
||
|
||
返回:float
|
||
|
||
### `log2(x)`
|
||
|
||
返回X以2为底的自然对数,也就是log2X
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ----------- |
|
||
| `x` | float | 实数,大于0 |
|
||
|
||
返回:float
|
||
|
||
### `logN(base, x)`
|
||
|
||
返回X以Base为底的自然对数,也就是logbaseX
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ----- | ----------- |
|
||
| `base` | float | 底数,实数 |
|
||
| `x` | float | 实数,大于0 |
|
||
|
||
返回:float
|
||
|
||
### `exp(x)`
|
||
|
||
返回自然对数e的X次方
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ---- |
|
||
| `x` | float | 实数 |
|
||
|
||
返回:float
|
||
|
||
### `intpower(base, exponent)`
|
||
|
||
计算Base的Exponent次幂,也就是计算BaseExponent
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---------- | ----- | ------------------------------------ |
|
||
| `base` | float | 底数,实数 |
|
||
| `exponent` | float | 指数,整数,如果不是整数则会进行取整 |
|
||
|
||
返回:float
|
||
|
||
### `power(base, exponent)`
|
||
|
||
计算Base的Exponent次幂,也就是计算BaseExponent,由于指数也是实数,计算速度要低于IntPower()函数
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---------- | ----- | --------------------------------------- |
|
||
| `base` | float | 底数,实数 |
|
||
| `exponent` | float | 指数,实数,非整数时,参数Base必须大于0 |
|
||
|
||
返回:float
|
||
|
||
### `ceil(x)`
|
||
|
||
得到不比参数X小的最小整数
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ---- |
|
||
| `x` | float | 实数 |
|
||
|
||
返回:float
|
||
|
||
### `ceil32(x)`
|
||
|
||
得到比参数X大的最小整数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ---- |
|
||
| `x` | float | 实数 |
|
||
|
||
返回:any
|
||
|
||
### `ceil64(x)`
|
||
|
||
得到比参数X大的最小整数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ---- |
|
||
| `x` | float | 实数 |
|
||
|
||
返回:any
|
||
|
||
### `floor(x)`
|
||
|
||
得到不比参数X大的最大整数
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ---- |
|
||
| `x` | float | 实数 |
|
||
|
||
返回:float
|
||
|
||
### `floor32(x)`
|
||
|
||
得到比参数X小的最大整数。参数: X:实数
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ---- |
|
||
| `x` | float | |
|
||
|
||
返回:any
|
||
|
||
### `floor64(x)`
|
||
|
||
得到比参数X小的最大整数。参数: X:实数
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ---- |
|
||
| `x` | float | |
|
||
|
||
返回:any
|
||
|
||
### `trunc(x)`
|
||
|
||
对X做取整运算,近似到最接近0的整数
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ---- |
|
||
| `x` | float | 实数 |
|
||
|
||
返回:any
|
||
|
||
### `trunc32(x)`
|
||
|
||
对X做取整运算,近似到最接近0的整数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ---- |
|
||
| `x` | float | 实数 |
|
||
|
||
返回:any
|
||
|
||
### `trunc64(x)`
|
||
|
||
对X做取整运算,近似到最接近0的整数。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ---- |
|
||
| `x` | float | 实数 |
|
||
|
||
返回:any
|
||
|
||
### `round32(x)`
|
||
|
||
对X做取整运算,近似到最接近的整数。 使用银行家算法进行四舍五入,“四舍六入五考虑,五后非零就进一,五后皆零看奇偶,五前为偶应舍去,五前为奇要进一”
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ---- |
|
||
| `x` | float | 实数 |
|
||
|
||
返回:any
|
||
|
||
### `round64(x)`
|
||
|
||
对X做取整运算,近似到最接近的整数。采用银行家舍入原则,“四舍六入五考虑,五后非零就进一,五后皆零看奇偶,五前为偶应舍去,五前为奇要进一”。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ---- |
|
||
| `x` | float | 实数 |
|
||
|
||
返回:any
|
||
|
||
### `simpleRound32(x)`
|
||
|
||
对X做取整运算,近似到最接近的整数。采用四舍五入原则,即尾数是五就进一。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ---- |
|
||
| `x` | float | 实数 |
|
||
|
||
返回:any
|
||
|
||
### `simpleRound64(x)`
|
||
|
||
对X做取整运算,近似到最接近的整数。采用四舍五入原则,即尾数是五就进一。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ---- |
|
||
| `x` | float | 实数 |
|
||
|
||
返回:any
|
||
|
||
### `roundTo(a_value, a_digit)`
|
||
|
||
使用银行家算法对AValue进行四舍五入,精确到10Adigit位。“四舍六入五考虑,五后非零就进一,五后皆零看奇偶,五前为偶应舍去,五前为奇要进一”。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ----- | ---------------------- |
|
||
| `a_value` | float | 实数 |
|
||
| `a_digit` | any | 整数,范围为\[-37,37\] |
|
||
|
||
返回:array
|
||
|
||
### `simpleRoundTo(a_value, a_digit)`
|
||
|
||
返回参数AValue四舍五入后的值。四舍五入的位置由参数Adigit决定,尾数是五就进一。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ----- | ---------------------- |
|
||
| `a_value` | float | 实数 |
|
||
| `a_digit` | any | 整数,范围为\[-37,37\] |
|
||
|
||
返回:array
|
||
|
||
### `isNan(a_value)`
|
||
|
||
返回布尔型真假值,确定指定的参数AValue是否是一个NAN数。 模型支持数组的输入,还加入了两个可选参数对异常值处理: Opt1:异常值处理,为0表示不做处理(默认情况);为1表示计算跳过nil值;为2表示跳过所有的异常值; Opt2: 报错填充值,当某单元报错的时候,使用该参数填充。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ---- | -------- |
|
||
| `a_value` | any | 任意数据 |
|
||
|
||
返回:bool
|
||
|
||
### `isInfinite(a_value)`
|
||
|
||
返回布尔型真假值,确定指定的参数AValue是否是一个正或负的无穷大的数。 模型支持数组的输入,还加入了两个可选参数对异常值处理: Opt1:异常值处理,为0表示不做处理(默认情况);为1表示计算跳过nil值;为2表示跳过所有的异常值; Opt2: 报错填充值,当某单元报错的时候,使用该参数填充。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ---- | -------- |
|
||
| `a_value` | any | 任意数据 |
|
||
|
||
返回:bool
|
||
|
||
### `sign(a_value)`
|
||
|
||
Sign函数,判断参数AValue的符号。如果为正,返回+1,如果为负数,返回-1,如果为0,则返回0
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ----- | ---- |
|
||
| `a_value` | float | 实数 |
|
||
|
||
返回:bool
|
||
|
||
### `isZero(a, epsilon)`
|
||
|
||
返回布尔真假值。返回A是否在(0-Epsilon,0+ Epsilon)范围内。 常用于判断两个浮点数是否相等。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ----- | ------------------------ |
|
||
| `a` | float | 实数,需要进行判断的数据 |
|
||
| `epsilon` | float | 与0的差距范围,实数 |
|
||
|
||
返回:bool
|
||
|
||
### `min(a, b)`
|
||
|
||
返回A、B中的较小值,如果A、B是数组,需保证两个参数的数据维度相同,一一比较对应位置的两个数字,返回较小的值
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ---- |
|
||
| `a` | array | 实数 |
|
||
| `b` | array | 实数 |
|
||
|
||
返回:array
|
||
|
||
### `max(a, b)`
|
||
|
||
返回A、B中的较大值,如果A、B是数组,需保证两个参数的数据维度相同,一一比较对应位置的两个数字,返回较大的值
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | --------- |
|
||
| `a` | array | 实数/数组 |
|
||
| `b` | array | 实数/数组 |
|
||
|
||
返回:array
|
||
|
||
### `compareValue(a, b, epsilon)`
|
||
|
||
返回-1,0或1。比较A与B的大小,如果A大于B,返回+1,如果A小于B,返回-1,如果相等,则返回0。参数Epsilon表示一个范围,如果A和B的差距大于这个范围,则进行正常的比较,如果A和B的差距小于这个范围,则认为A等于B。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ----- | -------- |
|
||
| `a` | float | 实数 |
|
||
| `b` | float | 实数 |
|
||
| `epsilon` | float | 误差范围 |
|
||
|
||
返回:any
|
||
|
||
### `sameValue(a, b, epsilon)`
|
||
|
||
返回A与B是否近似相等。两者的差距是否小于Epsilon参数定义的范围
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ----- | -------------------------- |
|
||
| `a` | float | 实数 |
|
||
| `b` | float | 实数 |
|
||
| `epsilon` | float | 表示一个两者差距的最大范围 |
|
||
|
||
返回:bool
|
||
|
||
### `randomRange(a_from, a_to)`
|
||
|
||
返回一个介于参数AFrom(包括)和参数ATo(不包括)之间的随机整数
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| -------- | ---- | ---- |
|
||
| `a_from` | any | 整数 |
|
||
| `a_to` | any | 整数 |
|
||
|
||
返回:any
|
||
|
||
### `randG(mean, std_dev)`
|
||
|
||
随机产生均值为Mean,标准差为StdDev的服从高斯分布的数据。往往用于模拟取样误差。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ----- | ------------------------------- |
|
||
| `mean` | float | 作为产生正态分布的均值 |
|
||
| `std_dev` | float | 作为产生正态分布的标准差,大于0 |
|
||
|
||
返回:float
|
||
|
||
### `any(data, n)`
|
||
|
||
判断任意值或数组或数组其行列数据的真假,集合中只要有一个元素是真则为真。 判定标准:是需要至少一个为真,否则为假。如空数组判定为假。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||
| `data` | array | 当N缺省或取默认值0时,可以为任意数据,否则只能是数组。 |
|
||
| `n` | any | 若取值0,对Data整体判断,如果Data是数组,则对所有元素进行判断,缺省值。;若取值1,对数组Data的各行进行判断。;若取值2,对数组Data的各列进行判断。;注:nil、’’(空字符串)、空数组判断为假,其他包括nan判断为真。 |
|
||
|
||
返回:array
|
||
|
||
### `all(data, n)`
|
||
|
||
所有为真,判断任意值或数组或数组其行列数据的真假,集合中只要有一个元素为假则为假。 判定标准:集合中至少有一个为假则为假,否则为真。如空数组判定为真。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||
| `data` | array | 当N缺省或取默认值0时,可以为任意数据,否则只能是数组。 |
|
||
| `n` | any | 若值为0,则对Data整体判断,如果Data是数组,则对所有元素进行判断,缺省值。;若值为1,对数组Data的各行进行判断。;若值为2,对数组Data的各列进行判断。;注:nil、’’(空字符串)判断为假,其他包括nan、array()(空数组)判断为真。 |
|
||
|
||
返回:array
|
||
|
||
### `gamma(x)`
|
||
|
||
计算伽马(Gamma)函数的数值 伽马(Gamma)函数的定义为
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | -------------------- |
|
||
| `x` | array | 大于0,支持数值数组。 |
|
||
|
||
返回:array
|
||
|
||
### `gammaln(x)`
|
||
|
||
计算对数gamma
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | -------------------- |
|
||
| `x` | array | 大于0,支持数值数组。 |
|
||
|
||
返回:array
|
||
|
||
### `erf(x)`
|
||
|
||
误差函数也称为概率函数,其定义为
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ------------------ |
|
||
| `x` | array | 实型变量。支持数组 |
|
||
|
||
返回:array
|
||
|
||
### `erfinv(x)`
|
||
|
||
误差函数逆函数
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ----------------- |
|
||
| `x` | array | 实型变量,支持数组 |
|
||
|
||
返回:array
|
||
|
||
### `erfc(x)`
|
||
|
||
误差累计分布函数
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ------------------ |
|
||
| `x` | array | 实型变量。支持数组 |
|
||
|
||
返回:array
|
||
|
||
### `erfcinv(x)`
|
||
|
||
误差累计逆函数
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ----- | ----------------- |
|
||
| `x` | array | 实型变量.支持数组 |
|
||
|
||
返回:array
|
||
|
||
### `slnDepreciation(cost, salvage, life)`
|
||
|
||
返回根据直线折旧法计算的每期折旧额。类似地,计算现值加速折旧法折旧的函数是SYDDepreciation。计算方法是用资产原值Cost减去资产残值Salvage的差除以折旧周期数Life
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ----- | -------------------- |
|
||
| `cost` | float | 实数,资产原值 |
|
||
| `salvage` | float | 实数,资产残值 |
|
||
| `life` | any | 整数,设备的使用期数 |
|
||
|
||
返回:float
|
||
|
||
### `sydDepreciation(cost, salvage, life, period)`
|
||
|
||
根据"sum-of-years-digits depreciation"方法计算某期的折旧额。这是一种加速折旧方法,在早一些的年份折旧速度快于晚一些的年份。计算方法是:(Cost-Salvage)\*Period/\[(1+Life)\* Life/2\]
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ----- | ---------------------------- |
|
||
| `cost` | float | 实数,资产原值 |
|
||
| `salvage` | float | 实数,资产残值 |
|
||
| `life` | any | 整数,设备的使用期数 |
|
||
| `period` | any | 整数,指出计算第几期的折旧额 |
|
||
|
||
返回:float
|
||
|
||
### `graphGroup(graph1, graph_n, prop_m, value_m)`
|
||
|
||
用于生成图形组合,可以指定任意多个单个图形作为参数生成一个图形组合,在其后面还可以指定图形组合的共有属性。 共有属性我们也叫做TGraphGroup属性,系统默认的共有属性字段见图形字段函数: 注:数据字段用于描述某一个点的状态的数据,TGraph属性字段用于描述某一个图形的属性,TGraphgroup属性字段用于描述整个图形组合的属性。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| --------- | ------ | ------------------------------------ |
|
||
| `graph1` | any | TGraph 图形1 |
|
||
| `graph_n` | any | TGraph 图形N |
|
||
| `prop_m` | string | string 可选参数,TGraphGroup属性名称 |
|
||
| `value_m` | any | any 可选参数,TGraphGroup属性值 |
|
||
|
||
返回:any
|
||
|
||
### `getCValue(cmyk)`
|
||
|
||
得到颜色的cmyk模式的C值。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `cmyk` | any | |
|
||
|
||
返回:any
|
||
|
||
### `getMValue(cmyk)`
|
||
|
||
得到颜色的cmyk模式的M值。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `cmyk` | any | |
|
||
|
||
返回:any
|
||
|
||
### `getYValue(cmyk)`
|
||
|
||
得到颜色的cmyk模式的Y值。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `cmyk` | any | |
|
||
|
||
返回:any
|
||
|
||
### `getKValue(cmyk)`
|
||
|
||
得到颜色的cmyk模式的K值。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `cmyk` | any | |
|
||
|
||
返回:any
|
||
|
||
### `rgbbgr(rgb)`
|
||
|
||
颜色转换,对RGB和BGR两种颜色规范进行转换。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----- | ---- | ---- |
|
||
| `rgb` | any | |
|
||
|
||
返回:any
|
||
|
||
### `paletteIndex(i)`
|
||
|
||
调色板中的颜色。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---- | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||
| `i` | any | PC_RESERVED = 1; { palette index used for animation };PC_EXPLICIT = 2; { palette index is explicit to device };PC_NOCOLLAPSE = 4; { do not match color to system palette } |
|
||
|
||
返回:any
|
||
|
||
### `getRValue(rgb)`
|
||
|
||
得到颜色的R值。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----- | ---- | ---- |
|
||
| `rgb` | any | |
|
||
|
||
返回:any
|
||
|
||
### `getGValue(rgb)`
|
||
|
||
得到颜色的G值。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----- | ---- | ---- |
|
||
| `rgb` | any | |
|
||
|
||
返回:any
|
||
|
||
### `getBValue(rgb)`
|
||
|
||
得到颜色的B值。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----- | ---- | ---- |
|
||
| `rgb` | any | |
|
||
|
||
返回:any
|
||
|
||
### `readFile(data_type, alias, file_name, pos, length, data)`
|
||
|
||
将本地的文件读取出来。文件格式可以是字符流、整数流、实数流、字节流等。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ----------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||
| `data_type` | any | 整数类型。参考文件读写类型函数。 |
|
||
| `alias` | string | 字符串类型。参考目录别名。 |
|
||
| `file_name` | string | 字符串类型。文件名称。 |
|
||
| `pos` | any | 整数类型。读文件的偏移位置,执行结束后将返回新的位置。 |
|
||
| `length` | any | 整数类型。需要读入的数据长度,一次读取的最大长度为100w。 |
|
||
| `data` | array | 当读文件执行出错,则存贮错误信息,如果执行正确,则用来存贮读出的数据。如果文件类型为rwRaw或者rwBinary则返回一个长度为Length的字符串或者二进制流,否则,返回一个长度为Length的数组。例如类型为rwReal就是返回一个实数数组。 |
|
||
|
||
返回:bool
|
||
|
||
### `fileModeToStr(mode)`
|
||
|
||
文件模式数值转换成文件模式字符串。仅NG客户端中支持。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | ---- |
|
||
| `mode` | any | |
|
||
|
||
返回:string
|
||
|
||
### `sleep(milliseconds)`
|
||
|
||
暂停执行。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| -------------- | ---- | --------------------------------------------------- |
|
||
| `milliseconds` | any | 整数,需要暂停的毫秒数。例如暂停一秒为Sleep(1000)。 |
|
||
|
||
返回:void
|
||
|
||
### `sysParamStr(index)`
|
||
|
||
获得命令行的指定索引的参数值。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---------------------------------------------------------------------------------------------------------------------- |
|
||
| `index` | any | 整数,命令行参数的索引号。Index=0,返回值为当前天软脚本文件名称;Index>0,返回值为额外传入的命令行参数值(字符串类型) |
|
||
|
||
返回:string
|
||
|
||
### `sysReleaseMutex(mutex)`
|
||
|
||
释放一个互斥锁。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------- | ---- | ---------------- |
|
||
| `mutex` | any | 整数,互斥锁编号 |
|
||
|
||
返回:bool
|
||
|
||
### `sysexecnewpipe(flag)`
|
||
|
||
创建Sysexec进程的管道。参数缺省时,默认创建读写管道。创建之后会与第一次被用的进程进行绑定,当有多个Sysexec进程时,可以创建多个管道分别进行读写操作。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||
| `flag` | any | 整数,可选参数,控制创建管道的读写属性。Flag转换为二进制时,第0位表示是否可读,第1位表示是否可写。即;若为0,创建的管道可以进行读写操作;;若为1,创建的管道只能进行读操作;;若为2,创建的管道只能进行写操作。 |
|
||
|
||
返回:bool
|
||
|
||
### `sysexecdeletepipe(process_handle)`
|
||
|
||
删除指定进程的管道。参数缺省时,删除默认管道。 指定进程是指在通过sysexecnewpipe创建管道后,sysexec的进程使用的管道。如果不重复使用sysexecnewpipe创建也不删除,这个管道可以被复用,如果每次执行前都新建管道,则可以为不同的进程使用不同的管道。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ---------------- | ---- | -------------------------- |
|
||
| `process_handle` | any | 数值,可选参数,进程句柄。 |
|
||
|
||
返回:bool
|
||
|
||
### `sysGetSubProcesses(pid, return_value)`
|
||
|
||
获得进程的子进程列表
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| -------------- | ----- | -------------------------------------------------------------- |
|
||
| `pid` | any | 整数,可选参数,进程ID。未指定时默认获取当前进程内的子进程列表 |
|
||
| `return_value` | array | 获取成功,返回子进程ID列表;否则,返回空数组 |
|
||
|
||
返回:array
|
||
|
||
### `zipCompress(zip_alias, zip_filename, alias, filename, path)`
|
||
|
||
将文件压缩到ZIP文件中,如果压缩文件不存在,函数会创建一个。ZIP格式的压缩不支持加密。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| -------------- | ------ | ----------------------------- |
|
||
| `zip_alias` | string | 字符串,ZIP文件的目录别名 |
|
||
| `zip_filename` | string | 字符串,ZIP文件名称 |
|
||
| `alias` | string | 字符串,被压缩文件的目录别名 |
|
||
| `filename` | string | 字符串,文件名称 |
|
||
| `path` | string | 字符串,文件在ZIP文件中的路径 |
|
||
|
||
返回:bool
|
||
|
||
### `zipExtract(zip_alias, zip_filename, alias, path, password)`
|
||
|
||
将ZIP文件解压到指定目录
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| -------------- | ------ | -------------------------- |
|
||
| `zip_alias` | string | 字符串 ,ZIP文件的目录别名 |
|
||
| `zip_filename` | string | 字符串 ,ZIP文件名称 |
|
||
| `alias` | string | 字符串,文件解压目录别名 |
|
||
| `path` | string | 字符串,文件解压路径 |
|
||
| `password` | string | 字符串,可选参数,加密密码 |
|
||
|
||
返回:bool
|
||
|
||
### `rarExtract(rar_alias, rar_filename, alias, path, password)`
|
||
|
||
将RAR文件解压到指定目录
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| -------------- | ------ | -------------------------- |
|
||
| `rar_alias` | string | 字符串 ,RAR文件的目录别名 |
|
||
| `rar_filename` | string | 字符串 ,RAR文件名称 |
|
||
| `alias` | string | 字符串,文件解压目录别名 |
|
||
| `path` | string | 字符串,文件解压路径 |
|
||
| `password` | string | 字符串,可选参数,加密密码 |
|
||
|
||
返回:bool
|
||
|
||
### `functionVer(type, name)`
|
||
|
||
返回函数版本号。函数版本号是一个函数保存在SERVER的一个版本标识,可以用来判断函数是否被修改过。可和SAVETABLE和LOADTABLE综合使用。
|
||
|
||
| 参数 | 类型 | 说明 |
|
||
| ------ | ------ | ------------------ |
|
||
| `type` | any | 整数,函数类型。 |
|
||
| `name` | string | 字符串,函数名称。 |
|
||
|
||
返回:any
|