dateutils 0.4.11

Dateutils are a bunch of tools that revolve around fiddling with dates and times in the command line, with a strong focus on use cases that arise when dealing with large amounts of financial data. Their target market is shell scripts that need date calculations or calendar conversions, and as such they are highly pipe-able and modeled after their well-known cousins (e.g. dtest vs. test, or dgrep vs. grep).

Tags c shell date calculation utilites command line time conversion calendar
License BSDL
State stable

Recent Releases

0.4.1125 Jan 2024 11:52 minor bugfix: Bugfixes: - be strict about inputs in datetest --isvalid (#146) - build on Macs again (#107) - make illegible zone names fatal errors (#151) - be strict in datetest --isvalid when inputs have been specified (#146) - fix issue with negative days remaining after adding months in datediff (#153)
0.4.1025 May 2022 14:09 minor bugfix: Bugfixes: - do not resort to daisy sequences when incomplete dates are present (#131) - upon end-of-buffer finalise the last line (#141) - let --empty-mode -E and --sed-mode -S play nicely together (#139) - adapt CLI behaviour of strptime(1) to the other tools (#142)
0.4.920 Aug 2021 08:02 minor bugfix: Bugfixes: - allow to specify epochs in nanoseconds, s N (#123) - fix nanosecond arithmetic (#124) - make cross-compilations easier (#128) - mention default timezone (#129)
0.4.817 Feb 2021 15:25 minor bugfix: Bugfixes: - be symmetric about differences, A - B := -(B - A) for A B - fix security issue when reading TZMAP_DIR from environment - fix printing of negative 0 (-0) - fix issue with tzdata transitions in files with leap second adjustments that are now cut off at expiration time (#121)
0.4.703 Feb 2020 13:09 minor bugfix: Bugfixes: - strptime mimics return code behaviour of dateconv - use unsigned arithmetic for leap second conversion - fix up ymds before adding days or business days - drain prchunk if filled with many small lines
0.4.619 Mar 2019 08:06 minor bugfix: Bugfixes: - underspecified ISO weekday dates can be parsed - adding days to underspecified dates results in proper dates Features: - all tools with -S --sed-mode now support -E --empty-mode to output an empty line when a line cannot be read. - dateround supports day, week, month and year classes now (issues/92) - datediff can determine difference in nanoseconds between two time values (issues/94)
0.4.520 Sep 2018 09:06 minor bugfix: Bugfixes: - dgrep accepts c as qualifier in expressions (issue 81) - tests work regardless of wall clock time (issue 84)
0.4.413 Aug 2018 10:50 minor bugfix: Incompatible changes: - suffix `m` is no longer accepted as a synonym for `mo` with date-only input, issue #76 Bugfixes: - expose BSD routines (fgetln()) to yuck - for dates passed to dateround(1) that coincidentally match the roundspecs do read them as dates - wrong timestamps read via -i s signal error - facilitate bmake build - time rounding on date-only input keeps the date unchanged - dateseq's short-cut iterator (2 date arguments) does not interfere with the 3-argument version - adding 0 date or time units does not change the summand - datezone on times (without date) will return times - zones are singletons now, opened and closed only once
0.4.301 Mar 2018 11:59 minor bugfix: Features: - base expansion works for times now Bugfixes: - durations in months weeks and days are calculated like durations in months and days, consistency - am and pm indicators in inputs are handled properly - military midnights decay when not printed in full
0.4.207 Aug 2017 05:08 minor bugfix: Features: - allow - specifiers to turn off padding (as GNU date does) - support matlab day numbers, as `mdn` or `matlab` Bugfixes: - fix build issue on FBSD 11 - allow zones to transition at INT_MAX (mapped to `never`)
0.4.113 Dec 2016 05:31 minor bugfix: Bugfixes: - bug/50, keep end-of-term (ultimo) property in dateseq(1) - allow today/now for ywd dates in 1 parameter dateseq(1) - allow different calendars for start and end date in dateseq(1) - round time in dateround(1) in zone then convert --from-zone - allow SPC padded numerals in d input format
0.4.020 May 2016 08:38 minor bugfix: Bugfixes: - document g/ G format specifiers - bug/42, accept NUL characters in input - bug/45, correctly display Gregorian and ISO week dates in one line - bug/46, adhere to ISO group's official formatting of week dates - bug/47, allow rounding of Epoch based timestamps - bug/48, avoid crash for void input to strptime(3) Features: - datetest supports --isvalid to conditionalise on date/time parsing - all tools support --from-locale to parse localised input - tools with output formatting support --locale to format output according to locale
0.3.522 Jan 2016 11:22 minor bugfix: Bugfixes: - bug/40, distinguish between numerals-only dates and durations - tests will succeed independent of current date
0.3.428 Aug 2015 12:45 minor bugfix: Bugfixes: - bug/39, MacOSX endianness detection - bug/38, ddiff day-only durations on date/times
0.3.310 Jun 2015 12:56 major feature: Features: - to clarify purpose and avoid name clashes prefix binaries with date- This results in: dateadd dateconv datediff dategrep dateround dateseq datesort datetest and datezone - provide compatibilty through configure switch --with-old-names - provide single digit years through _y - allow rounding of ISO-week dates (ywd) to week numbers Bugfixes: - dashes behind a date do not count as tz indicator - UTC/TAI/GPS special coordinated zones work on systems without leap second support
0.3.206 Mar 2015 06:00 minor bugfix: Bugfixes: - out of range minutes will be discarded - bug 30 (malicious input crashes dconv) has been fixed Features: - military midnight stamps are supported (T24:00:00) - 8601 ordinal dates (year + doy) are recognised directly (`-f yd`) - strptime(1) can behave in a locale-dependent way
0.3.108 Oct 2014 06:06 minor bugfix: Bugfixes: - octave/matlab code is distributed fully - negative durations with refined units are minus-signed only once - ddiff is entirely anticommutative now - tests don't fail if zones don't exist on the build system - dseq with empty ranges will no longer produce output (just as seq(1)) - arbitrary integers are not interpreted as time anymore - when converting from zone info properly clear zone difference for Z - dseq(1) will automatically resort to +1mo and +1y iterators for wildcarded ymd dates - dadd(1)'ing ywd dates with output as ymd works properly now Features: - ddiff can output nanosecond diffs - automatic fix-up of dates is documented now - parser errors and fix ups are reported through return code 2 - dseq with no `-f --format` stays in the calendric system of the start value instead of converting all output to ymd
0.3.025 Aug 2014 14:46 major feature: Features: - dgrep supports time zones both for the expression and the input - timezones can be specified by alternative codes and tzmap files - new tool dzone to inspect date/times in multiple timezones in bulk - new tool dsort to sort input chronologically - gengetopt and help2man maintainer dependencies removed - lilian/julian inputs via `-i ldn` and `-i jdn` - ymcw dates now follow ISO 8601 in using 07 to denote Sunday Bugfixes: - ddiff takes differences between a unix epoch stamp and a date/time - zone converter assigns correct sign to zone difference when using Z - weekdays are properly calculated from epoch stamps (issue 24)