#include <time.h>

Public Member Functions

 csharp_date_time (const ::uint64_t v=0)
 
::uint64_t to_unix () const
 
double to_seconds () const
 
 operator uint64_t () const
 
::uint64_t to_binary () const
 
bool operator== (const csharp_date_time &other) const
 

Static Public Member Functions

::uint64_t to_unix (const ::uint64_t val)
 
static double to_seconds (const ::uint64_t val)
 
static csharp_date_time to_csharp (const ::uint64_t uval)
 

Public Attributes

::uint64_t value
 

Friends

std::ostream & operator<< (std::ostream &out, const csharp_date_time &date_time)
 
std::istream & operator>> (std::istream &in, csharp_date_time &date_time)
 

Detailed Description

Wrapper to ensure proper conversion of C# DateTime value

Constructor & Destructor Documentation

csharp_date_time ( const ::uint64_t  v = 0)

Constructor

Member Function Documentation

operator uint64_t ( ) const
inline

Implicit convertion to an unsigned 64-bit integer

Returns
integer representation
bool operator== ( const csharp_date_time other) const

Test if the object is equal to another of the same type

Parameters
otherother object being compared
Returns
true if they are equal
uint64_t to_binary ( ) const

Implicit convertion to an unsigned 64-bit integer

Returns
integer representation

Implicit convertion to an unsigned 64-bit integer

Returns
integer representation
csharp_date_time to_csharp ( const ::uint64_t  uval)
static

Convert to c# format

Parameters
uvaltime_t unix format
Returns
C# DateTime.ToBinary format
double to_seconds ( ) const

Convert to to seconds with fractions

Returns
seconds with fractions
double to_seconds ( const ::uint64_t  val)
static

Convert to seconds with fractions

http://stackoverflow.com/questions/4014652/how-do-datetime-tobinary-and-datetime-tofiletime-differ

Parameters
valC# DateTime.ToBinary format
Returns
seconds with fractions
uint64_t to_unix ( ) const

Convert to time_t unix format

Returns
time_t unix format
uint64_t to_unix ( const ::uint64_t  val)
static

Convert to time_t unix format

http://stackoverflow.com/questions/4014652/how-do-datetime-tobinary-and-datetime-tofiletime-differ

Parameters
valC# DateTime.ToBinary format
Returns
time_t unix format

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const csharp_date_time date_time 
)
friend

Write date type as integer to an output stream

Parameters
outoutput stream
date_timedata time object
Returns
output stream
std::istream& operator>> ( std::istream &  in,
csharp_date_time date_time 
)
friend

Read a date type from the input stream

Parameters
ininput stream
date_timedata time object
Returns
input stream

Member Data Documentation

::uint64_t value

Date time in csharp DateTime.ToBinary format


The documentation for this struct was generated from the following files: