Files
divkit/test_data/expression_test_data/function_signatures_datetime.json
T
denlvovich e5063769f7 Added len() function to dict
commit_hash:ec81d67275138150c1bc92e6c2b1009ee71935c4
2025-07-04 15:25:35 +03:00

447 lines
11 KiB
JSON

{
"signatures": [
{
"function_name": "parseUnixTime",
"doc": "Creates datetime from integer value of unix time. Returns datetime value.",
"arguments": [
{
"type": "integer",
"doc": "Time in UTC seconds from the epoch."
}
],
"result_type": "datetime",
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"function_name": "parseUnixTimeAsLocal",
"doc": "Creates datetime in local timezone from integer value of unix time. Returns datetime value.",
"arguments": [
{
"type": "integer",
"doc": "Time in local time zone seconds from the epoch."
}
],
"result_type": "datetime",
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"function_name": "nowLocal",
"doc": "Creates datetime from time of now. Returns datetime value.",
"arguments": [],
"result_type": "datetime",
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"function_name": "addMillis",
"doc": "Adds milliseconds to original date. Returns datetime with added time in milliseconds.",
"arguments": [
{
"type": "datetime",
"doc": "Datetime value, date to add milliseconds."
},
{
"type": "integer",
"doc": "Integer value, count of milliseconds to add."
}
],
"result_type": "datetime",
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"function_name": "setYear",
"doc": "Sets year number to original date. Returns datetime with year set.",
"arguments": [
{
"type": "datetime",
"doc": "Datetime value, date to set year."
},
{
"type": "integer",
"doc": "Integer value, year to set to date."
}
],
"result_type": "datetime",
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"function_name": "setMonth",
"doc": "Sets month number to original date. Returns datetime with month set.",
"arguments": [
{
"type": "datetime",
"doc": "Datetime value, date to set month."
},
{
"type": "integer",
"doc": "Integer value, month to set to date. Expected values from 1 to 12."
}
],
"result_type": "datetime",
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"function_name": "setDay",
"doc": "Sets day of month number to original date. Returns datetime with day of month set.",
"arguments": [
{
"type": "datetime",
"doc": "Datetime value, date to set day of month."
},
{
"type": "integer",
"doc": "Integer value, day of month to set to date."
}
],
"result_type": "datetime",
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"function_name": "setHours",
"doc": "Sets hours number to original date. Returns datetime with hours set.",
"arguments": [
{
"type": "datetime",
"doc": "Datetime value, date to set hours."
},
{
"type": "integer",
"doc": "Integer value, hours to set to date."
}
],
"result_type": "datetime",
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"function_name": "setMinutes",
"doc": "Sets minutes number to original date. Returns datetime with minutes set.",
"arguments": [
{
"type": "datetime",
"doc": "Datetime value, date to set minutes."
},
{
"type": "integer",
"doc": "Integer value, minutes to set to date."
}
],
"result_type": "datetime",
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"function_name": "setSeconds",
"doc": "Sets seconds number to original date. Returns datetime with seconds set.",
"arguments": [
{
"type": "datetime",
"doc": "Datetime value, date to set seconds."
},
{
"type": "integer",
"doc": "Integer value, seconds to set to date."
}
],
"result_type": "datetime",
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"function_name": "setMillis",
"doc": "Sets milliseconds number to original date. Returns datetime with milliseconds set.",
"arguments": [
{
"type": "datetime",
"doc": "Datetime value, date to set milliseconds."
},
{
"type": "integer",
"doc": "Integer value, milliseconds to set to date."
}
],
"result_type": "datetime",
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"function_name": "getYear",
"doc": "Returns year number of original date.",
"arguments": [
{
"type": "datetime",
"doc": "Datetime value, date to get year."
}
],
"result_type": "integer",
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"function_name": "getMonth",
"doc": "Returns month number of original date.",
"arguments": [
{
"type": "datetime",
"doc": "Datetime value, date to get month."
}
],
"result_type": "integer",
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"function_name": "getDay",
"doc": "Returns day of month of original date.",
"arguments": [
{
"type": "datetime",
"doc": "Datetime value, date to get day of month."
}
],
"result_type": "integer",
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"function_name": "getDayOfWeek",
"doc": "Returns day of week of original date, where Sunday is 7.",
"arguments": [
{
"type": "datetime",
"doc": "Datetime value, date to get day of week."
}
],
"result_type": "integer",
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"function_name": "getHours",
"doc": "Returns hours number of original date.",
"arguments": [
{
"type": "datetime",
"doc": "Datetime value, date to get hours."
}
],
"result_type": "integer",
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"function_name": "getMinutes",
"doc": "Returns minutes number of original date.",
"arguments": [
{
"type": "datetime",
"doc": "Datetime value, date to get minutes."
}
],
"result_type": "integer",
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"function_name": "getSeconds",
"doc": "Returns seconds number of original date.",
"arguments": [
{
"type": "datetime",
"doc": "Datetime value, date to get seconds."
}
],
"result_type": "integer",
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"function_name": "getMillis",
"doc": "Returns milliseconds number of original date.",
"arguments": [
{
"type": "datetime",
"doc": "Datetime value, date to get milliseconds."
}
],
"result_type": "integer",
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"function_name": "formatDateAsLocal",
"doc": "Formatting dates in a local timezone in users locale. Used default locale. Look https://en.wikipedia.org/wiki/ISO_8601 for more. `Z` for timezones not supported.",
"arguments": [
{
"type": "datetime",
"doc": "Datetime value, date to get milliseconds."
},
{
"type": "string",
"doc": "Date and time formats are specified by date and time pattern strings."
}
],
"result_type": "string",
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"function_name": "formatDateAsUTC",
"doc": "Formatting dates in a UTC timezone in users locale. Used default locale. Look https://en.wikipedia.org/wiki/ISO_8601 for more. `Z` for timezones not supported.",
"arguments": [
{
"type": "datetime",
"doc": "Datetime value, date to get milliseconds."
},
{
"type": "string",
"doc": "Date and time formats are specified by date and time pattern strings."
}
],
"result_type": "string",
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"function_name": "formatDateAsLocalWithLocale",
"doc": "Formatting dates in a local timezone with localization. Look https://en.wikipedia.org/wiki/ISO_8601 for more. `Z` for timezones not supported.",
"arguments": [
{
"type": "datetime",
"doc": "Datetime value, date to get milliseconds."
},
{
"type": "string",
"doc": "Date and time formats are specified by date and time pattern strings."
},
{
"type": "string",
"doc": "Language for specified date and time pattern strings."
}
],
"result_type": "string",
"platforms": [
"android",
"ios",
"web",
"flutter"
]
},
{
"function_name": "formatDateAsUTCWithLocale",
"doc": "Formatting dates in a UTC timezone with localization. Look https://en.wikipedia.org/wiki/ISO_8601 for more. `Z` for timezones not supported.",
"arguments": [
{
"type": "datetime",
"doc": "Datetime value, date to get milliseconds."
},
{
"type": "string",
"doc": "Date and time formats are specified by date and time pattern strings."
},
{
"type": "string",
"doc": "Language for specified date and time pattern strings."
}
],
"result_type": "string",
"platforms": [
"android",
"ios",
"web",
"flutter"
]
}
]
}