gregorian date and julian

Hi all, Can anyone tell me how to construct a date (gregorian) with a julian number ? I tried the constructor "date(special_values sv)" and it looked like it would work, but Im not sure if I can do this (what for is this constructor ?) So after taking a look in the source I found another possibility: greg_year_month_day ymd = gregorian_calendar::from_julian_day_number(2443510); date d(ymd); So are both ways right ? thanks in advance -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

On Sat, 18 Aug 2007 09:25:40 +0200, thom_schu wrote
Hi all, Can anyone tell me how to construct a date (gregorian) with a julian number ? I tried the constructor "date(special_values sv)" and it looked like it would work, but Im not sure if I can do this (what for is this constructor ?)
This constructor is used to create 'special values' like not_a_date_time and negative infinity. It isn't able to use a julian day.
So after taking a look in the source I found another possibility:
greg_year_month_day ymd = gregorian_calendar::from_julian_day_number(2443510);
date d(ymd);
So are both ways right ?
The second one is the right way. There really should be better documentation of this -- code reading isn't good. And maybe even a little simplier way to do this. Can I get you to write a feature request for this? http://svn.boost.org/trac/boost/newticket Thx, Jeff
participants (2)
-
Jeff Garland
-
thom_schu@gmx.de