|
Boost Users : |
From: Jeff Garland (jeff_at_[hidden])
Date: 2007-08-18 16:48:14
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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net