def xx { .dt := \%* xecho "\frpad(\m(dt),38,\32)" date \m(dt) } echo echo "C-Kermit 7.0 and later free-format date/time parsing..." echo "Documentation: http://www.kermitproject.org/ckermit70.html#x1.6" echo "The first five examples require C-Kermit 9.0.304 Dev.24 or later." echo "The sixth example is an impossible date." echo echo "\frpad(Free-format date,38,\32)Result" xx 2020:02:29 xx 2020:02:29:07:30:01 xx 2020:02:29 07:30:01 xx 2019:02:28 07:30:01 +1d xx 2020:02:29 07:30:01 +1d xx 20190229 07:30:01 +1d xx 20200229 xx 20010208 10:28:01 xx 19800526 13:07:12 xx 19800526 13:07:12 xx 20010208_10:28:35 xx 18580101:12:00:00 xx 20110208T00:00:00 xx Fri Aug 10 16:38:01 2001 xx Fri Aug 10 16:38:01 GMT 2001 xx Sat, 14 Jul 2001 11:49:29 xx Fri, 24 Mar 2000 14:19:59 EST xx Tue, 26 Jun 2001 10:19:45 -0400 (EDT) xx 20020208102835.515 xx now xx today xx today +12:30 xx tomorrow xx yesterday xx yesterday -1d xx yesterday -1w xx yesterday -1y xx sunday xx monday +6days xx tuesday +5days xx wednesday +4days xx thursday +3days xx friday +2days xx saturday +1day xx sunday +0days xx monday 12:34:56 +6days xx tuesday 12:34:56 +5days xx wednesday 12:34:56 +4days xx thursday 12:34:56 +3days xx friday 12:34:56 +2days xx saturday 12:34:56 +1day xx sunday 12:34:56 +1week xx 18 Sep 2001 xx 18 September 2001 xx 2001 Sept 18 xx 18-Sep-2001 xx 18/09/2001 xx 18.09.2001 xx 18_09_2001 xx 09/18/2001 xx 2001/09/18 xx September 18, 2001 xx Sep-18-2001 xx 20010918 xx Tue, 18 Sep 2001 xx Tue,18 Sep 2001 xx Tue 18 Sep 2001 xx Tuesday 18 Sep 2001 xx Tuesday, 18 Sep 2001 xx Friday, 18 Sep 2001 xx 20010918 xx 20010918123456 xx 7-Oct-77 xx 7-Oct-0077 xx 11:59:59 xx 11:59 xx 11 xx 11:59:59.33 xx 11:59:59.66 xx 03:21:00 xx 3:21:00 xx 15:21:00 xx :21:00 xx ::01 xx 11::59 xx 03:02:01 xx 3:02:01 xx 3:2:1 xx 11:59:59 xx 11:59:59AM xx 11:59:59A.M. xx 11:59:59am xx 11:59:59a.m. xx 11:59:59PM xx 11:59:59P.M. xx 11:59:59pm xx 11:59:59p.m. xx 11:30:00 EST xx 11:30:00 GMT xx 11:30:00 PST xx 11:30:00Z xx 11:30PM GMT xx 11:30 -0500 xx 11:30 -0800 xx 11:30 +0200 xx 18-Sep-2001 +1day xx today +1day xx now+1d xx + 1 day xx + 1 day 3:14:42 xx + 7 weeks xx +1d3:14:42 xx +1w3:14:42 xx +1m3:14:42 xx +1y3:14:42 xx 2 feb 2001 + 10 years xx 2001-02-08 +10y12 xx 31-dec-1999 23:59:59+00:00:01 xx 28-feb-1996 +1day xx 28-feb-1997 +1day xx 28-feb-1997 +1month xx 28-feb-1997 +1month 11:59:59 xx 28-feb-1997 +20years xx 28-feb-1997 +8000years xx 18-Sep-2001 12:34:56 +1-3:23:01 xx 18-Sep-2001 12:34:56 +1d3:23:01 xx 18-Sep-2001 12:34:56 +1 day 3:23:01 xx 11-Aug-2001 12:34:56 -0800 xx 11-Aug-2001 12:34:56 -08:00 xx 11-Aug-2001 12:34:56 -0800 xx 11-Aug-2001 12:34:56 -08:00 xx 11-Aug-2001 12:34:56 -800 xx 11-Aug-2001 12:34:56 -8 xx 11-Aug-2001 12:34:56 -0800 -0800 xx 11-Aug-2001 12:34:56 -0800 -08:00 xx 10-Aug-2001 13:05:23 +1d6:20:34 xx 10-Aug-2001 13:05:23 +1w6:20:34 xx 10-Aug-2001 13:05:23 +1m6:20:34 xx 10-Aug-2001 13:05:23 +1y6:20:34 xx 10-Aug-2001 13:05:23 +1 day 6:20:34 xx 10-Aug-2001 13:05:23 +1 week 6:20:34 xx 10-Aug-2001 13:05:23 +1 month 6:20:34 xx 10-Aug-2001 13:05:23 +1 year 6:20:34 xx 10-Aug-2001 13:05:23+1d6:20:34 xx 10-Aug-2001 13:05:23+1w6:20:34 xx 10-Aug-2001 13:05:23+1m6:20:34 xx 10-Aug-2001 13:05:23+1y6:20:34 exit