1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-04 08:43:13 +02:00

api: add support of specifier %! for timestamp in function util_strftimeval

This commit is contained in:
Sébastien Helleu
2024-01-27 11:52:54 +01:00
parent 73a1c9753a
commit e3af6a91d4
8 changed files with 44 additions and 22 deletions
+3 -2
View File
@@ -4698,10 +4698,10 @@ This function is not available in scripting API.
==== util_strftimeval
_WeeChat ≥ 4.2.0._
_WeeChat ≥ 4.2.0, updated in 4.3.0._
Format date and time like function `strftime` in C library, using `struct timeval`
as input, and supporting extra specifiers for microseconds.
as input, and supporting extra specifiers.
Prototype:
@@ -4718,6 +4718,7 @@ Arguments:
** `%.N` where `N` is between 1 and 6: zero-padded microseconds on N digits
(for example `%.3` for milliseconds)
** `%f`: alias of `%.6`
** `%!`: timestamp as integer, in seconds (value of tv->tv_sec)
Return value:
+3 -2
View File
@@ -4777,11 +4777,11 @@ Cette fonction n'est pas disponible dans l'API script.
==== util_strftimeval
_WeeChat ≥ 4.2.0._
_WeeChat ≥ 4.2.0, mis à jour dans la 4.3.0._
Formatter la date et l'heure comme la fonction `strftime` de la bibliothèque C,
en utilisant un `struct timeval` en entrée et en supportant des caractères de
conversion pour les microsecondes.
conversion supplémentaires.
Prototype :
@@ -4799,6 +4799,7 @@ Paramètres :
** `%.N` où `N` est entre 1 and 6: microsecondes remplies avec des zéros sur
N chiffres (par exemple `%.3` pour les millisecondes)
** `%f` : alias de `%.6`
** `%!` : horodatage sous forme d'entier, en secondes (valeur de tv->tv_sec)
Valeur de retour :
+3 -2
View File
@@ -4916,10 +4916,10 @@ Questa funzione non è disponibile nelle API per lo scripting.
// TRANSLATION MISSING
==== util_strftimeval
_WeeChat ≥ 4.2.0._
_WeeChat ≥ 4.2.0, updated in 4.3.0._
Format date and time like function `strftime` in C library, using `struct timeval`
as input, and supporting extra specifiers for microseconds.
as input, and supporting extra specifiers.
Prototype:
@@ -4936,6 +4936,7 @@ Arguments:
** `%.N` where `N` is between 1 and 6: zero-padded microseconds on N digits
(for example `%.3` for milliseconds)
** `%f`: alias of `%.6`
** `%!`: timestamp as integer, in seconds (value of tv->tv_sec)
Return value:
+3 -2
View File
@@ -4823,10 +4823,10 @@ weechat_printf (NULL, "date: %s",
// TRANSLATION MISSING
==== util_strftimeval
_WeeChat ≥ 4.2.0._
_WeeChat ≥ 4.2.0, updated in 4.3.0._
Format date and time like function `strftime` in C library, using `struct timeval`
as input, and supporting extra specifiers for microseconds.
as input, and supporting extra specifiers.
Prototype:
@@ -4843,6 +4843,7 @@ Arguments:
** `%.N` where `N` is between 1 and 6: zero-padded microseconds on N digits
(for example `%.3` for milliseconds)
** `%f`: alias of `%.6`
** `%!`: timestamp as integer, in seconds (value of tv->tv_sec)
Return value:
+6 -3
View File
@@ -4559,10 +4559,11 @@ weechat_printf (NULL, "date: %s",
==== util_strftimeval
_WeeChat ≥ 4.2.0._
_WeeChat ≥ 4.2.0, ажурирано у 4.3.0._
Форматира датум и време као функција `strftime` у C библиотеци, користећи `struct timeval`
као улаз и уз подршку додатних спецификатора за микросекунде.
// TRANSLATION MISSING
Format date and time like function `strftime` in C library, using `struct timeval`
as input, and supporting extra specifiers.
Прототип:
@@ -4579,6 +4580,8 @@ int weechat_util_strftimeval (char *string, int max, const char *format, struct
** `%.N` где је `N` између 1 и 6: микросекунде допуњене нулама на N цифара
(на пример `%.3` за милисекунде)
** `%f`: алијас за `%.6`
// TRANSLATION MISSING
** `%!`: timestamp as integer, in seconds (value of tv->tv_sec)
Повратна вредност: