#include <array>
#include <chrono>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <sstream>
Go to the source code of this file.
◆ SystemClock
typedef std::chrono::system_clock Nextsim::SystemClock |
◆ SystemDuration
typedef SystemClock::duration Nextsim::SystemDuration |
◆ julianGregorianShiftDays()
int Nextsim::julianGregorianShiftDays |
( |
int | year | ) |
|
Returns the number of days between the Julian and Gregorian years.
Returns the number of days between 1st January of the given year in the Julian and Gregorian calendars.
Definition at line 60 of file Time.cpp.
◆ mkgmtime()
std::time_t Nextsim::mkgmtime |
( |
std::tm * | time, |
|
|
bool | recalculateDoy = true ) |
converts the std::tm struct to a std::time_t value assuming UTC.
A UTC-fixed version of the standard library function mktime(). Calculates the duration between the Unix epoch and the given std::tm time and directly assigns that value.
- Parameters
-
time | Pointer to the tm structure to interpret. |
recalculateDoy | Flag argument for whether to calculate the day of the year from the year month and day values. |
Definition at line 39 of file Time.cpp.
◆ operator*() [1/2]
double Nextsim::operator* |
( |
const Duration & | a, |
|
|
double | b ) |
|
inline |
◆ operator*() [2/2]
double Nextsim::operator* |
( |
double | a, |
|
|
const Duration & | b ) |
|
inline |
◆ operator/() [1/2]
double Nextsim::operator/ |
( |
const Duration & | a, |
|
|
double | b ) |
|
inline |
◆ operator/() [2/2]
double Nextsim::operator/ |
( |
double | a, |
|
|
const Duration & | b ) |
|
inline |
◆ operator<<() [1/2]
std::ostream & Nextsim::operator<< |
( |
std::ostream & | os, |
|
|
const Duration & | dur ) |
|
inline |
◆ operator<<() [2/2]
std::ostream & Nextsim::operator<< |
( |
std::ostream & | os, |
|
|
const TimePoint & | tp ) |
|
inline |
◆ operator>>() [1/2]
std::istream & Nextsim::operator>> |
( |
std::istream & | is, |
|
|
Duration & | dur ) |
|
inline |
◆ operator>>() [2/2]
std::istream & Nextsim::operator>> |
( |
std::istream & | is, |
|
|
TimePoint & | tp ) |
|
inline |
◆ timeFromISO() [1/2]
std::time_t Nextsim::timeFromISO |
( |
const std::string & | iso | ) |
|
Returns a std::time_t from a given ISO date string of a specific format.
- Parameters
-
iso | A std::string in the ISO YYYY-MM-DDThh:mm:ss format. |
Definition at line 144 of file Time.cpp.
◆ timeFromISO() [2/2]
std::time_t Nextsim::timeFromISO |
( |
std::istream & | is | ) |
|
Returns a std::time_t from a given ISO date string of a specific format.
- Parameters
-
iso | A std::istream containing an ISO YYYY-MM-DDThh:mm:ss format date. |
Definition at line 151 of file Time.cpp.