site-josuah

/usr/josuah
Log | Files | Refs

commit 224ef40cd14ca6a5ef3d94a4ed713da7911d6db4
parent 469c1b4c21fad9b22508f94c4a3aef6d00a3b6b3
Author: Josuah Demangeon <me@josuah.net>
Date:   Thu, 25 Jun 2020 00:10:44 +0200

more compact function

Diffstat:
Mwiki/awk/index.md | 5-----
1 file changed, 0 insertions(+), 5 deletions(-)

diff --git a/wiki/awk/index.md b/wiki/awk/index.md @@ -314,31 +314,26 @@ function gmtime(sec, tm) tm["year"]++ sec -= s } - tm["mon"] = 1 while (sec >= (s = 86400 * mdays(tm["mon"], tm["year"]))) { tm["mon"]++ sec -= s } - tm["mday"] = 1 while (sec >= (s = 86400)) { tm["mday"]++ sec -= s } - tm["hour"] = 0 while (sec >= 3600) { tm["hour"]++ sec -= 3600 } - tm["min"] = 0 while (sec >= 60) { tm["min"]++ sec -= 60 } - tm["sec"] = sec } ```