Changeset 11215


Ignore:
Timestamp:
06/29/11 21:02:47 (13 years ago)
Author:
tbretz
Message:
Added NightAsInt
Location:
trunk/FACT++/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/Time.cc

    r11208 r11215  
    234234}
    235235
     236int Time::NightAsInt() const
     237{
     238    const Time tm = *this - boost::posix_time::hours(12);
     239    return tm.Y()*10000 + tm.M()*100 + tm.D();
     240}
     241
    236242// --------------------------------------------------------------------------
    237243//
  • trunk/FACT++/src/Time.h

    r11208 r11215  
    9696    double UnixTime() const;
    9797    double RootTime() const;
     98
     99    int NightAsInt() const;
    98100};
    99101
Note: See TracChangeset for help on using the changeset viewer.