git: 9front

Download patch

ref: eacffe81c4f156098ba7799908c7ee21eb226a43
parent: 1ec3271355b4d8f685ee0f2d3dec71d052d4acba
author: rodri <rgl@antares-labs.eu>
date: Mon May 13 09:37:22 EDT 2024

tmdate(2): fix two little typos in the examples

--- a/sys/man/2/tmdate
+++ b/sys/man/2/tmdate
@@ -226,7 +226,7 @@
 
 pst = "Tue Dec 10 12:36:00 PST 2019";
 est = "Tue Dec 10 15:36:00 EST 2019";
-f(tmparse(&a, Fmt, pst, nil, &e) == nil)
+if(tmparse(&a, Fmt, pst, nil, &e) == nil)
 	sysfatal("failed to parse: %r");
 if(*e != '\\0')
 	sysfatal("trailing junk %s", e);
@@ -266,7 +266,7 @@
 char *date = "Sun Nov 2 13:11:11 PST 2019";
 if(tmparse(&t, "W MMM D hh:mm:ss z YYYY, date, nil) == nil)
 	print("failed to parse");
-t.day++;
+t.mday++;
 tmnorm(&t);
 print("%τ", tmfmt(&t, nil)); /*  Mon Nov 3 13:11:11 PST 2019 */
 .EE
--