Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: decimal years

From   "Austin Nichols" <>
Subject   Re: st: decimal years
Date   Fri, 11 Aug 2006 15:54:44 -0400

There was an unfortunate accidental deletion in the middle of my last
post, esp. since the two sentences joined parse as one.  I insert the
missing text below:

On 8/11/06, Austin Nichols <> wrote:
Yes, I was joking about year zero, but decimal-year dates -0.1 and
-4.1 would be in 1 and 5 BCE, respectively, right?  So I was right to
use -g y=floor(ev)- for the year calculation, I think.  The trouble
arises in calculating the days elapsed since 1960 came around, which
means calculating the years elapsed (backwards) across an imaginary
zero year of length 365 (if that makes any sense).  A further problem

arises with the days in the year, which would be a fraction (1-x) from
the start of the year, where x is the fractional part of the date
variable.  Though given that the seventh month was named after a guy
who died in 44 BCE and the eighth month was named after a guy who died
in 14 AD, I don't know that you'd really want to use the date format
there.  Why doesn't Stata have the Gregorian-Julian-Israeli-etc.
calendar conversion built in, anyway?

Note that Stata stops caring at 100 AD:

. di %d -679350

. di %d -679351
*   For searches and help try:

© Copyright 1996–2021 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index