The member function day_number()returns this.
boost::gregorian::date d(2014, 10, 18);
uint32_t number = d.day_number();
The reverse can be achieved:
gregorian_calendar::ymd_type ymd = gregorian_calendar::from_day_number(dn);
d = { ymd.year, ymd.month, ymd.day };
, Boost Serialization, . . http://www.boost.org/doc/libs/1_56_0/doc/html/date_time/serialization.html
: Live On Coliru
#include <boost/date_time/gregorian/greg_date.hpp>
#include <boost/date_time/gregorian/gregorian_io.hpp>
#include <iostream>
using namespace boost::gregorian;
int main()
{
date d(2014, 10, 17);
static_assert(sizeof(d) == sizeof(int32_t), "truth");
std::cout << d << "\n";
uint32_t dn = d.day_number();
dn += 1;
gregorian_calendar::ymd_type ymd = gregorian_calendar::from_day_number(dn);
d = { ymd.year, ymd.month, ymd.day };
std::cout << d << "\n";
}