From 2cd65826013df34dc80c7441c4904cfa9c078fa9 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Mon, 30 Aug 2021 16:44:09 -0400 Subject: README: Document formats and Git repository Count the formats using: grep '^".*",$' src/datetime-formats.c | wc -l List the date formats using: sed -n 's|^/\* \(.*\) \*/$|\1|p' src/datetime-formats.c (But ignore 'Time only', 'ISO 8601: 1969-12-31 delimited by "T"', 'ISO 8601: 19691231 delimited by "T"', and '19691231'.) Math to 704: 43 (date formats) * 2 (positions: before or after time) = 86 86 + 1 (time-only no-date format) = 87 87 * 8 (time formats) = 696 696 + 8 (special formats) = 704 --- (limited to 'README') diff --git a/README b/README index c953475..a9b0a9a 100644 --- a/README +++ b/README @@ -6,6 +6,95 @@ commands, e.g.: @ 18:00; printf '\a' +Date/Time Formats +----------------- + +@ currently supports 704 date/time formats, any one of which may be +specified on the command line in one or more arguments. All spaces +shown below are optional. + +A time may be specified in any of the following eight formats: + + * 7:00:01 PM + * 19:00:01 + * 7:00 PM + * 19:00 + * 70001 PM + * 190001 + * 700 PM + * 1900 + +A date may be omitted or specified (before or after the time) in any of +the following 43 formats: + + * Wed + * 1969-12-31 + * 1969/12/31 + * 12-31-1969 + * 12-31 + * 12/31/1969 + * 12/31 + * 31 Dec 1969 + * 31 Dec + * 31-Dec-1969 + * 31-Dec + * 31/Dec/1969 + * 31/Dec + * Wed 31 Dec 1969 + * Wed 31 Dec + * Wed 31-Dec-1969 + * Wed 31-Dec + * Wed 31/Dec/1969 + * Wed 31/Dec + * Wed, 31 Dec 1969 + * Wed, 31 Dec + * Wed, 31-Dec-1969 + * Wed, 31-Dec + * Wed, 31/Dec/1969 + * Wed, 31/Dec + * Dec 31, 1969 + * Dec 31 + * Dec-31-1969 + * Dec-31 + * Dec/31/1969 + * Dec/31 + * Wed Dec 31, 1969 + * Wed Dec 31 + * Wed Dec-31-1969 + * Wed Dec-31 + * Wed Dec/31/1969 + * Wed Dec/31 + * Wed, Dec 31, 1969 + * Wed, Dec 31 + * Wed, Dec-31-1969 + * Wed, Dec-31 + * Wed, Dec/31/1969 + * Wed, Dec/31 + +Additionally, the following eight date/time formats are supported: + + * 1969-12-31T19:00:01 + * 1969-12-31T19:00 + * 19691231T190001 + * 19691231T1900 + * 19691231 70001 PM + * 19691231 190001 + * 19691231 700 PM + * 19691231 1900 + +Development +----------- + +@ is maintained in a Git repository. Browse: + + http://git.pehjota.net/atsign/atsign.git/ + +Clone: + + git://git.pehjota.net/atsign/atsign.git + +Patches may be e-mailed to the author, P. J. McDermott . + Copyright --------- -- cgit v0.9.1