diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-06-08 10:17:35 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-06-08 10:17:35 +0100 |
| commit | 43515be4f21d92d66f28588bcd0dc93ee517d301 (patch) | |
| tree | 165e1f458d331730e1b5e0de6bbdf772bf5ff9cb /src/local_time.cc | |
| parent | f5f45d829527a439bca012c2cfa2104a735a58f1 (diff) | |
Expand read_smpte_subtitle_test somewhat.
Diffstat (limited to 'src/local_time.cc')
| -rw-r--r-- | src/local_time.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/local_time.cc b/src/local_time.cc index 32e8e093..09729543 100644 --- a/src/local_time.cc +++ b/src/local_time.cc @@ -29,6 +29,7 @@ #include <cstdio> using std::string; +using std::ostream; using boost::lexical_cast; using namespace dcp; @@ -156,3 +157,24 @@ LocalTime::time_of_day (bool with_millisecond) const } return buffer; } + +bool +LocalTime::operator== (LocalTime const & other) const +{ + return _year == other._year && _month == other._month && _day == other._day && + _hour == other._hour && _second == other._second && _millisecond == other._millisecond && + _tz_hour == other._tz_hour && _tz_minute == other._tz_minute; +} + +bool +LocalTime::operator!= (LocalTime const & other) const +{ + return !(*this == other); +} + +ostream& +dcp::operator<< (ostream& s, LocalTime const & t) +{ + s << t.as_string (); + return s; +} |
