Commit Graph

14 Commits

Author SHA1 Message Date
timeless
d938849e7f util: use single quotes in use warning 2016-09-20 23:48:30 +00:00
Matt Mackall
8b736f8354 date: accept broader range of ISO 8601 time specs
The "normal" ISO date/time includes a T between date and time. It also
allows dropping the colons and seconds from the timespec. Add new
patterns for these forms as well as tests.
2016-07-27 15:22:36 -05:00
Sébastien Brissaud
ab917f03d2 test-parse-date: defines explicit start/end dates for DST
Prior to this patch, DST times where tested by specifying a custom TZ
environment variable that didn't defined DST transition times.

Due to a bug in glibc, the test fail on 32bits platforms that use timezone
files generated by zic from tzcode >= 2014c (glibc >= 2.20).

See https://sourceware.org/bugzilla/show_bug.cgi?id=19738

By defining explicit transition times for DST in the TZ environment variable,
the test is now independant to how the system guess those transition times.
2016-02-14 18:18:57 +01:00
Wagner Bruna
41a26dac7c messages: quote "hg help" hints consistently 2015-01-17 22:01:14 -02:00
Danek Duvall
304927ff96 solaris: sed doesn't recognize a line without a newline 2013-08-23 16:05:38 -07:00
Augie Fackler
e8c901fc2d parsedate: understand "now" as a shortcut for the current time 2013-02-09 15:39:22 -06:00
Paul Cavallaro
a9ed690f88 dates: support 'today' and 'yesterday' in parsedate (issue3764)
Adding support to parsedate in util module to understand the more idiomatic
dates 'today' and 'yesterday'.

Added unified tests and docstring tests for added functionality.
2013-01-23 09:51:45 -08:00
Martin Geisler
ff71ebe6cb test-parse-date: move remaining date parsing tests from test-log 2012-06-11 17:45:36 +02:00
Martin Geisler
153f2d8da4 test-parse-date: remove cruft from 752a743c1477
The test contained what looks like a copy-paste mistake.
2012-06-11 17:40:18 +02:00
Martin Geisler
a5339415db help/dates: use DATE as place-holder in help and abort texts
The use of "{datetime}" was unfortunate since I as a user never knew
if I was expected to do

  hg log -d '>{2011-04-01}'

or

  hg log -d '>2011-04-01'

The word "datetime" is also confusing -- calling it a date it much
simpler.
2011-04-05 10:01:39 +02:00
Matt Mackall
9da968682d date: fixup breakage from ">" fix 2011-04-04 09:39:22 -05:00
Matt Mackall
ac660e9f65 tests: cleanup exit code handling in unified tests 2010-09-21 16:00:02 -05:00
Matt Mackall
08439e0f2d tests: add exit codes to unified tests 2010-09-16 17:51:32 -05:00
Nicolas Dumazet
0c1ae173a8 tests: unify test-parse-date 2010-08-30 18:55:00 +09:00