gigasecond: initial commit and iteration 1
This commit is contained in:
parent
2aa26a8950
commit
7883503508
4 changed files with 150 additions and 0 deletions
18
cpp/gigasecond/gigasecond.h
Normal file
18
cpp/gigasecond/gigasecond.h
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#pragma once
|
||||
|
||||
#define EXERCISM_RUN_ALL_TESTS
|
||||
|
||||
#include <boost/date_time/gregorian/gregorian.hpp>
|
||||
|
||||
|
||||
namespace gigasecond {
|
||||
|
||||
typedef boost::gregorian::date date_t;
|
||||
typedef boost::gregorian::date_duration date_duration_t;
|
||||
|
||||
static inline date_t advance(date_t date)
|
||||
{
|
||||
return date + date_duration_t(1000000000 / (60*60*24));
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue