Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jan 1999 23:49:43 -0700
From:      Warner Losh <imp@village.org>
To:        Greg Lehey <grog@lemis.com>
Cc:        cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/usr.sbin/tcpdump/tcpslice tcpslice.c 
Message-ID:  <199901150649.XAA21928@harmony.village.org>
In-Reply-To: Your message of "Fri, 15 Jan 1999 17:09:33 %2B1030." <19990115170933.L55525@freebie.lemis.com> 
References:  <19990115170933.L55525@freebie.lemis.com>  <199901150546.VAA17426@freefall.freebsd.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <19990115170933.L55525@freebie.lemis.com> Greg Lehey writes:
: I thought there was some guideline that small 2-digit years represent
: 20xx, and large 2-digit years represent 19xx.

The short answer is that it depends.  I think that w/o reading the
file that tcpslice is looking at it would be hard to know for sure
which year to use.  So I made an arbitrary choice that made the
behavior well defined.

Two digit dates generally have been interpreted as meaning in the
century that context says they are in.  I suppose that I could have
figured out what year it was and made that year the "pivot" year.  For
example, right now 1999 is the pivot year.  1999 + 50 is 2049 and 1999
- 49 is 1950, so any number >= 50 means 19xx, while any number < 50
means 20xx.  In 2001 the pivot is 52, 2009 the pivot is 60, etc.  You
can quibble over the edge cases I'm sure.

Some have proposed that single digits < 38 mean 20xx and > 38 mean
19xx, but that isn't a good long term solution....

If you have a better suggestion, please let me know, or commit better
patches. :-)

Warner

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901150649.XAA21928>