From ae5a425420e3cafd1a9887f02ba60f972cb85ede Mon Sep 17 00:00:00 2001 From: AnnieRuru Date: Sat, 23 Mar 2019 23:27:05 +0800 Subject: Add optional parameter for *gettimestr --- doc/script_commands.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc/script_commands.txt') diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 19f189f81..c99f27206 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -3531,7 +3531,7 @@ Examples : --------------------------------------- -*gettimestr(, ) +*gettimestr(, {, }) This function will return a string containing time data as specified by the format string. @@ -3545,6 +3545,7 @@ Max length is the maximum length of a time string to generate. The example given in Hercules sample scripts works like this: mes(gettimestr("%Y-%m/%d %H:%M:%S", 21)); + mes(gettimestr("%Y-%m/%d %H:%M:%S", 21, getcalendartime(0, 0))); This will print a full date and time like 'YYYY-MM/DD HH:MM:SS'. -- cgit v1.2.3-70-g09d2 From b478fb0a7373af0d80912641fbe08e9cbb49464e Mon Sep 17 00:00:00 2001 From: AnnieRuru Date: Sat, 23 Mar 2019 23:28:30 +0800 Subject: Fix strftime in the documentation --- doc/script_commands.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc/script_commands.txt') diff --git a/doc/script_commands.txt b/doc/script_commands.txt index c99f27206..2f210bf99 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -3536,9 +3536,9 @@ Examples : This function will return a string containing time data as specified by the format string. -This uses the C function 'strfmtime', which obeys special format +This uses the C function 'strftime', which obeys special format characters. For a full description see, for example, the description of -'strfmtime' at http://www.delorie.com/gnu/docs/glibc/libc_437.html +'strftime' at http://www.delorie.com/gnu/docs/glibc/libc_437.html All the format characters given in there should properly work. Max length is the maximum length of a time string to generate. -- cgit v1.2.3-70-g09d2