summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2019-04-07 20:27:22 +0200
committerGitHub <noreply@github.com>2019-04-07 20:27:22 +0200
commit73dacb74a8d2ed52590a6d6b8b937d9e14f77d8e (patch)
tree9aee364596b3d53f88dda7d465ec1fc7f84aeb9f /doc
parented5a86ed44b19d1e4c203f78c7bf2551442d2319 (diff)
parentb478fb0a7373af0d80912641fbe08e9cbb49464e (diff)
downloadhercules-73dacb74a8d2ed52590a6d6b8b937d9e14f77d8e.tar.gz
hercules-73dacb74a8d2ed52590a6d6b8b937d9e14f77d8e.tar.bz2
hercules-73dacb74a8d2ed52590a6d6b8b937d9e14f77d8e.tar.xz
hercules-73dacb74a8d2ed52590a6d6b8b937d9e14f77d8e.zip
Merge pull request #2388 from AnnieRuru/61-gettimestr
Add optional parameter for *gettimestr
Diffstat (limited to 'doc')
-rw-r--r--doc/script_commands.txt7
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 237b1b3d7..ba3627d6a 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -3532,20 +3532,21 @@ Examples :
---------------------------------------
-*gettimestr(<format string>, <max length>)
+*gettimestr(<format string>, <max length>{, <timestamp>})
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.
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'.