12#ifndef WSFDATETIME_HPP
13#define WSFDATETIME_HPP
15#include "wsf_export.h"
19#include "UtCalendar.hpp"
42 double GetJulianDate(
int aYear,
int aMonth,
int aDay,
double aSecondsPastMidnight)
const;
46 void GetStartDate(
int& aYear,
int& aMonth,
int& aDay)
const;
48 void GetStartTime(
int& aHour,
int& aMinute,
double& aSecond)
const;
56 bool SetStartTime(
int aHour,
int aMinute,
double aSecond);
66 void GetCurrentTime(
double aSimTime, UtCalendar& aCurrentTime)
const;
73 void ProcessStartDate(UtInput& aInput);
74 void ProcessStartTime(UtInput& aInput);
75 void ProcessStartEpoch(UtInput& aInput);
76 void ProcessStartTimeNow();
80 bool mUsingSystemTime{
false};
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
bool SetStartEpoch(double aEpoch)
Set the start time as the Epoch (year*1000 + day "." fractional day).
Definition WsfDateTime.cpp:97
bool ProcessInput(UtInput &aInput)
Process simulation input commands 'start_date' and 'start_time'.
Definition WsfDateTime.cpp:123
double GetJulianDate(int aYear, int aMonth, int aDay, double aSecondsPastMidnight) const
Return the Julian date (i.e.: the number of days since 12:00:00 UTC on 1 January 4713 B....
Definition WsfDateTime.cpp:39
WsfDateTime(const WsfDateTime &)=default
bool UsingSystemTime() const
Return whether this object was initialized with system / wall clock time.
Definition WsfDateTime.cpp:208
const UtCalendar & GetStartDateAndTime() const
Get the start date and time of the simulation.
Definition WsfDateTime.cpp:68
bool SetStartDate(int aYear, int aMonth, int aDay)
Set the start date.
Definition WsfDateTime.cpp:88
bool SetStartTime(int aHour, int aMinute, double aSecond)
Set the start time as the number of hours, minutes and seconds past midnight of the start day.
Definition WsfDateTime.cpp:115
double GetStartJulianDate() const
Return the Julian date of the start date and time.
Definition WsfDateTime.cpp:26
UtCalendar GetCurrentTime(double aSimTime) const
Definition WsfDateTime.cpp:172
WsfDateTime & operator=(const WsfDateTime &aRhs)=delete
operator= declared but not defined to prevent use.
void GetStartTime(int &aHour, int &aMinute, double &aSecond) const
Get the start time as the number of hours, minutes and seconds past midnight of the start day.
Definition WsfDateTime.cpp:60
void GetStartDate(int &aYear, int &aMonth, int &aDay) const
Get the start date of the simulation.
Definition WsfDateTime.cpp:49
void SetCurrentDateAndTime()
Definition WsfDateTime.cpp:103