Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
... | |||||
| * | datetime: Get now (struct tm) from caller | P. J. McDermott | 2022-03-18 | 3 | -19/+18 |
| | | |||||
| * | datetime: Move & unify time() & localtime() calls | P. J. McDermott | 2022-03-18 | 1 | -6/+3 |
| | | |||||
| * | tests: Use @'s -F option to auto test all fmts | P. J. McDermott | 2022-03-17 | 1 | -79/+20 |
| | | |||||
| * | tests: WIP parse test | P. J. McDermott | 2022-03-17 | 1 | -7/+103 |
| | | |||||
| * | tests: Add (stub) parse test | P. J. McDermott | 2022-03-17 | 4 | -1/+40 |
| | | |||||
| * | tests/aux/tap-functions.sh: Drop `set -x` | P. J. McDermott | 2022-03-17 | 1 | -2/+0 |
| | | |||||
| * | tests/aux/tap-functions.sh: New file from Automake | P. J. McDermott | 2022-03-17 | 2 | -1/+233 |
| | | | | | | | | https://git.savannah.gnu.org/cgit/automake.git/plain/t/ax/tap-functions.sh | ||||
| * | build-aux/tap-driver.sh: New file from Automake | P. J. McDermott | 2022-03-17 | 4 | -1/+662 |
| | | | | | | | | https://git.savannah.gnu.org/cgit/automake.git/plain/lib/tap-driver.sh | ||||
| * | main: Add undocumented debugging option | P. J. McDermott | 2022-03-17 | 2 | -4/+29 |
| | | | | | | | | | | Prints the number of seconds between the UNIX epoch and the specified time. | ||||
* | | README: Fix number of formats | P. J. McDermott | 2022-03-18 | 1 | -1/+1 |
| | | |||||
* | | datetime: Try time-only formats only once | P. J. McDermott | 2022-03-18 | 1 | -1/+10 |
|/ | |||||
* | .gitignore: Exclude *SUMS | P. J. McDermott | 2022-03-17 | 1 | -0/+2 |
| | |||||
* | TODO: Add tasks | P. J. McDermott | 2022-03-17 | 1 | -0/+3 |
| | |||||
* | main: Make (struct option) variable static const | P. J. McDermott | 2022-03-17 | 1 | -1/+1 |
| | |||||
* | main: Use difftime() instead of comparing time_t | P. J. McDermott | 2022-03-16 | 2 | -6/+7 |
| | | | | | | | | | | C99 ยง 7.23.1 defines time_t as an "arithmetic [type] capable of representing times" with "implementation-defined" "range and precision of times representable". It doesn't require that time1 > time0 for time1 later than time0. See also: http://computer-programming-forum.com/47-c-language/8d7dec65bd1ddafe.htm | ||||
* | TODO: New file | P. J. McDermott | 2022-03-16 | 1 | -0/+2 |
| | |||||
* | README: Compare to related programs | P. J. McDermott | 2021-09-01 | 1 | -0/+7 |
| | |||||
* | main: Skip empty formats | P. J. McDermott | 2021-09-01 | 1 | -0/+9 |
| | | | | | | This was previously done in _datetime_strftime() but in a way that would overflow the array if an empty format was at the end. Moving this logic into the caller is safer and makes a little more sense. | ||||
* | datetime: Collapse spaces after strftime() | P. J. McDermott | 2021-09-01 | 2 | -24/+33 |
| | | | | Turns "Sep 1" into "Sep 1". | ||||
* | NEWS, configure.ac: Set version to 1.0.0 | P. J. McDermott | 2021-08-31 | 2 | -2/+2 |
| | |||||
* | datetime: Free fmt bufs when iterators reach end | P. J. McDermott | 2021-08-31 | 2 | -33/+22 |
| | | | | Simplifies caller code. | ||||
* | datetime: Replace %d with %e in some formats | P. J. McDermott | 2021-08-31 | 1 | -12/+12 |
| | |||||
* | Add option to list supported formats | P. J. McDermott | 2021-08-31 | 4 | -14/+204 |
| | |||||
* | datetime: Find ends of arrays with sizeof() | P. J. McDermott | 2021-08-31 | 1 | -10/+12 |
| | | | | | | | | | | | | Before: $ wc -c @ 61256 @ After: $ wc -c @ 60616 @ | ||||
* | datetime: Add UNIX-like date format | P. J. McDermott | 2021-08-31 | 2 | -1/+4 |
| | |||||
* | main: Handle options | P. J. McDermott | 2021-08-31 | 2 | -3/+96 |
| | |||||
* | datetime: Add missing #include in header | P. J. McDermott | 2021-08-31 | 1 | -0/+2 |
| | |||||
* | main: Fix exit status on buffer alloc failure | P. J. McDermott | 2021-08-31 | 1 | -1/+1 |
| | | | | Fixes an issue in code moved in commit ad183ca4. | ||||
* | README: Add more examples | P. J. McDermott | 2021-08-30 | 1 | -0/+2 |
| | |||||
* | datetime: Replace goto with function calls | P. J. McDermott | 2021-08-30 | 1 | -66/+72 |
| | | | | | goto is fine, but this splits up a function that had grown a little long. | ||||
* | datetime: Replace unnecessary fprintf with fputs | P. J. McDermott | 2021-08-30 | 1 | -1/+1 |
| | |||||
* | datetime: Replace large list of formats | P. J. McDermott | 2021-08-30 | 3 | -832/+131 |
| | |||||
* | README: Document formats and Git repository | P. J. McDermott | 2021-08-30 | 1 | -0/+89 |
| | | | | | | | | | | | | | | | | | | | | 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 | ||||
* | datetime: Drop ambiguous delimiter-less formats | P. J. McDermott | 2021-08-30 | 1 | -4/+0 |
| | | | | | "20210920210920" could be parsed as either 2021-09-20 21:09:20 or 20:21:09 2021-09-20. | ||||
* | build: Drop unnecessary $(DATA) | P. J. McDermott | 2021-08-29 | 1 | -1/+1 |
| | |||||
* | datetime: Support weekday-only dates | P. J. McDermott | 2021-08-29 | 2 | -2/+36 |
| | |||||
* | datetime: Init all relevant struct tm members | P. J. McDermott | 2021-08-29 | 1 | -4/+11 |
| | |||||
* | main: Prevent dates too large to consistently show | P. J. McDermott | 2021-08-29 | 2 | -4/+10 |
| | |||||
* | datetime: Make year optional | P. J. McDermott | 2021-08-29 | 2 | -5/+377 |
| | |||||
* | datetime: Add some missing formats | P. J. McDermott | 2021-08-29 | 1 | -0/+8 |
| | |||||
* | datetime: Remove debugging output | P. J. McDermott | 2021-08-29 | 1 | -5/+0 |
| | |||||
* | Move concatenation function | P. J. McDermott | 2021-08-29 | 3 | -53/+52 |
| | |||||
* | main: Improve output | P. J. McDermott | 2021-08-29 | 1 | -4/+5 |
| | |||||
* | Add loop, adjust datetime_parse() param and decls | P. J. McDermott | 2021-08-29 | 4 | -24/+44 |
| | |||||
* | datetime: Minor cleanup | P. J. McDermott | 2021-08-29 | 1 | -2/+2 |
| | |||||
* | datetime: Further implement | P. J. McDermott | 2021-08-29 | 6 | -50/+555 |
| | | | | | Simplify concatenation, factor out formats, and determine date if not specified. | ||||
* | datetime: WIP | P. J. McDermott | 2021-08-29 | 4 | -0/+121 |
| | |||||
* | Initial commit | P. J. McDermott | 2021-08-28 | 17 | -0/+1776 |