|
|
The component extractors can be used to view the individual components of a Time, which will (of course) be normalized values. For example:
Time t = Time::julian(1987,632) - Duration::hours(12); cout << t.month_part() << "/" << t.day_part() << "/" << t.year_part() << " " << t.clock_part() << endl;
prints:
8/22/1988 0d 12h 00m 00sSince there were 365 days in 1987, day 632 of 1987 is normalized to day 267 of 1988, which was September 23; however normalizing the Duration (- 12h) changes the Time to noon on September 22.
Note that all component extractors come in two forms: one with and one without a Place parameter. The ones without a Place parameter assume the host machine location.