Differences between revisions 3 and 6 (spanning 3 versions)
Revision 3 as of 2007-01-24 17:26:51
Size: 654
Comment: State that date support was added and docs are missing
Revision 6 as of 2010-07-22 07:28:49
Size: 1208
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
This is no longer a plan, but implemented as of Mercurial 0.9.3, but documentation is still missing. This is no longer a plan, but implemented as of Mercurial 0.9.3, see "hg help dates".

=== Supp
orted Commands ===
Line 18: Line 20:

=== Date Formats ===

Various date formats are supported. Here are some examples:

{{{
"Wed Dec 6 13:18:29 2006" (local timezone assumed)
"Dec 6 13:18 -0600" (year assumed, time offset provided)
"Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000)
"Dec 6" (midnight)
"13:18" (today assumed)
"3:39" (3:39AM assumed)
"3:39pm" (15:39)
"2006-12-6 13:18:29" (ISO 8601 format)
"2006-12-6 13:18"
"2006-12-6"
"12-6"
"12/6"
"12/6/6" (Dec 6 2006)
}}}

Get more info on date formats with hg help:

{{{
$ hg help dates
}}}

This is no longer a plan, but implemented as of Mercurial 0.9.3, see "hg help dates".

Supported Commands

hg log:

There is a -d/--date switch to show log entries from particular dates. Supported formats:

  • "{date}" - a single date
  • "<{date}" - on or before a given date

  • ">{date}" - on or after a given date

  • "{date} to {date}" - a date range, inclusive
  • "-{days}" - within a given number of days of today

We'll need to scan the entire changelog as there's no guarantee that there's any date ordering.

hg update/revert:

-d/--date results in scanning the log for the first matching changeset. This is usually what people want.

Date Formats

Various date formats are supported. Here are some examples:

"Wed Dec 6 13:18:29 2006" (local timezone assumed)
"Dec 6 13:18 -0600" (year assumed, time offset provided)
"Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000)
"Dec 6" (midnight)
"13:18" (today assumed)
"3:39" (3:39AM assumed)
"3:39pm" (15:39)
"2006-12-6 13:18:29" (ISO 8601 format)
"2006-12-6 13:18"
"2006-12-6"
"12-6"
"12/6"
"12/6/6" (Dec 6 2006)

Get more info on date formats with hg help:

$ hg help dates

DatePlan (last edited 2010-07-22 07:28:49 by MartinGeisler)