Boost logo

Boost :

From: Martin Min (lingvisa_at_[hidden])
Date: 2007-07-11 14:34:22

Thanks for your reply.
First, by "You can use gregorian::greg_year which is the first parameter to
a date", do you mean a date can be constructed by just passing greg_year? or
still I have to provide a month and day?

 I am working in Natural Language Understanding area, in which
underspecifed Temporal Expressions abound in typical news text, and
reasoning on these type of knowledge often has to deal with incomplete
information. The granularity (or resolution) of time often changes in a
discourse, sometimes year, or month, or date, or time, even century.

What I like most boost::date_time are the various arithematic operations on
durations and date periods, and timezone support. Of course, as well as the

Probably, what I can do is to define another Date class, which have the
boost::date_time::date has a member, and add members I may need?

On 7/11/07, Jeff Garland <jeff_at_[hidden]> wrote:
> On Wed, 11 Jul 2007 13:05:40 -0500, Martin Min wrote
> > Hi, recently I found boost::date_time is a great library to work
> > with for temporal work. But now I have a problem for your help with
> > or input.
> >
> > It looks like the constructor of 'date' has three parameters year,
> > month, day. What about if I just want to construct a Date with
> > 'year'?, because this is typical in text, like "In 1991, ...".
> Yep, there are 3 really isn't a 'date' without these
> specifics.
> > Is this possilbe? If not, is there any way around this limitation?
> No.
> > or even more, can I represent sth like "In the 21st century", or
> > "the winter of 1998"?
> There isn't a type to do this in the library, but you could certainly add
> your
> own.
> > But now, for me it is important to represent dates like "1998",
> > without any month or day mentioned.
> You can use gregorian::greg_year which is the first parameter to a
> date. I
> guess the real question is, what do you want to do with the partial data
> information.
> Jeff
> _______________________________________________
> Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at